Some of Our Favorite Features in Android 5.0 Lollipop

Android 5.0 Lollipop is the latest major revision to Google’s mobile operating … more

Sony SmartEyeglass SDK Developer Preview Released

A little over a month ago in Tokyo, Japan, Sony unveiled its new SmartEyeglasstechnology. … more

XDA and Leaseweb: Server Trial/Moto 360 Contest (Winners!)

About a month ago, we held a contest along with XDA’s host, Leaseweb, to … more

Updated Android Lollipop Preview Images – XDA TV

The Android Lollipop Preview Images are now available! That and much more news is … more
Post Reply

git links

OP crpalmer

15th July 2013, 10:55 AM   |  #1  
OP Senior Member
Thanks Meter: 2,551
 
1,761 posts
Join Date:Joined: Mar 2011
Donate to Me
I've had a few interactions lately about git and how to make more advanced use of it for development pn Android. I thought it would be worth sharing some good links:
  • git users manual
    - Canonical reference for git
  • a tutorial introduction to git
    - A simple set of steps that has you create a small git repository and play with it. Highly recommended to try.
  • Everyday git
    - Takes the tutorial idea a bit further by essentially watching a kernel maintainer's screen. Good to skim over to see basic thought processes.
  • Branching and merging with git
    - A very thorough article about branches and merging. Recommended, but is long.
  • gitref.org
    - An exploration of the various commands git uses with fantastic examples and summaries

The tutorial is good to get you started, the "Everyday git" is good to start to learn how to use some of the power of git. The branching and merging is really important, but hard, to really understand some of the great power of git.

One piece of git that I think is particularly important for anyone that wants to send pull requests to public repos or maintain repos that other people will use is the "rebase" function of git. Here's a good example of using it in a standard development work-flow:

git rebase example

Before pushing commits, it's generally nice to look at them objectively and to ask yourself: would someone that didn't participate in the development of these commits read the list and make sense of them? Ideally, the one line subjects (git log --online --no-merges) should make a clear progression of commits, grouped by function/module/topic and with clear descriptions and subjects.

It is said elsewhere in the links, but I'll say it too. Don't rebase commits that you have pulled from the git server. You should not rewrite published history, only the history that you have created locally and are ready to push upstream.
The Following 12 Users Say Thank You to crpalmer For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Droid DNA Original Android Development by ThreadRank