Forums Added for the Oppo R5, Oppo N3, and Xiaomi Redmi Note

Just yesterday, Oppo unveiled a pair of rather unique smartphones, the Oppo … more

How to Play Music From Android Wear – XDA TV

Yesterday, we showed you how to do some advanced things with your Moto 360 quite easily … more

Google Updates Play Games, Wallet, Docs, Sheets, Slides, Drive, Google+, and Camera

While we haven’t really had much in the way of … more

Google Execs Talk to Ars About Android 5.0 Lollipop

Android 5.0 Lollipop is right around the corner, and it’s expected to hit AOSP … more
Post Reply

git links

OP crpalmer

15th July 2013, 10:55 AM   |  #1  
OP Senior Member
Thanks Meter: 2,596
 
1,792 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