Skip to content

Instantly share code, notes, and snippets.

@joerixaop
Created November 19, 2010 10:12
Show Gist options
  • Save joerixaop/706314 to your computer and use it in GitHub Desktop.
Save joerixaop/706314 to your computer and use it in GitHub Desktop.
Notes on Rubyconf ninja git training
word diffing:
git diff --word-diff
Slides presentation: http://git-tips.heroku.com/ <- no ninja's inside :-(
Useful commands:
git log --decorate --oneline --graph
git bundle # Especially useful for VPN etc.
Branches + merging:
git branch --merged # shows merged branches, candidates for deletion?
git branch --no-merged # shows unmerged branches, candidates for merging?
git branch --contains identifier # Shows branches that contain that commit in their history
create tracking branches 3 ways:
git checkout -b frotz origin/frotz
git checkout -t origin/frotz
git checkout frotz
git push -u origin frotz # pushes (creates on remote if necessary) and sets up tracking (-u option was added around 1.7)
pushing behaviour
git config --global push.default (matching|nothing|tracking|current)
^default ^safest ^best? ^safe
More info (by presenter):
http://bit.ly/classygit (git bundle seems useful when using USB sticks)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment