Big Android BBQ 5.0 Recap – XDA TV

This fifth annual Big Android BBQ has come and gone. The speakers have spoke, the sponsors have … more

Microsoft to Counter “OK Google” with Bing Torque

When Microsoft is making apps for Android, users should be aware that something … more

Google Confirms “Android Lollipop Day” for November 3rd

A little over a week ago, Google announced the latest iteration of … more

Get Your XDA 2015 Custom Avatar and Signature Images Here

As stated in our motto, XDA Developer is for developers, by developers. The … more
Post Reply

git links

OP crpalmer

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