Learn More About Linux with Linux Man Pages

Linux is quite a powerful and very configurable operating system. Thanks to some user-friendly … more

Detect, Avoid IMSI-Catcher Attacks with Android IMSI-Catcher Detector

Privacy is always an important topic, as well as a delicate one to … more

Materialized LeanDroid Fights Your Poor Battery Life

Battery life has always been one of the biggest problems facing most Android devices. … more

Bump! Workaround for the LG G3 Locked Bootloader – XDA TV

The LG G3 is a power house device. It’s been a favorite of many people. … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

git links

OP crpalmer

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