Yet another git cheat sheet!

Everyone else seems to have blogged about their favorite git features, so I might as well do the same… AND I don’t want to forget these items, so:

Setting up a bare repository for shared use:

git init -bare --shared=group foo.git

Pushing the first commit to a new remote:

git push -u origin master

gitolite is cool.  Here’s a cheat:

To push local tags back to the origin:

git push --tags

and to push branches:

git push origin BRANCHNAME


git stash  # simple
git stash pop  # unwind
git stash save "comment"  # like stash with a comment/name
git stash list # where are we in stashes


git rev-parse master # give me the UUID for the named patch

Create a new SVN branch from git svn. see:

$ git svn branch -n -m "This is my new branch" bug23
$ git checkout -b local/bug23

Another neat tool is Gource, an animated OpenGL-based visualization of your git (or other) repository.

Deal with line endings: