# apt-get install git-core
$ git config --global branch.autosetupmerge true
$ git config --global color.ui auto
$ git config --global user.emailfoo@example.com $ git config --global user.name 'Foo Bar ' $ git config --global user.signingkey12345678
$ git branch
$ git branch -r
$ git branch -a
$ git branchmybranch
$ git checkoutmybranch
$ git branch -dmybranch
$ git push origin :mybranch
$ git symbolic-ref HEAD refs/heads/mybranch
$ git filter-branch --tree-filter 'rm -fmydirectory/myfile ' HEAD $ git reflog expire --expire=0 --all $ git prune $ git repack -adf
$ git symbolic-ref HEAD refs/heads/mybranch $ rm .git/index Commit new content
$ mkdir ../mybranch $ cd ../mybranch $ git init Commit new content $ cd - $ git fetch ../mybranch master:mybranch
$ git clone git://ormyserver /myrepository .git
$ git clone http://ormyserver /myrepository .git
$ git clone ssh://myserver /myrepository .git
$ git clone gitosis@myserver :myrepository .git
$ git clone git://myserver /myrepository .git $ git checkout -bmybranch origin/mybranch
$ git checkout -f master
$ git clean -dxf
$ git pull
$ git commit -s -m "My commit. "
$ git commit -a -m "My commit. "
$ git commit -m "My commit. "myfirstfile mysecondfile mythirdfile [...]
$ git addormyfile
$ git addmydirectory
$ git add .
$ git rmormyfile
$ git rmmydirectory
$ git mvormyfile mynewfile
$ git mvmydirectory mynewdirectory
$ git mergeHASH
$ git merge --squashHASH $ git commit -a -m "My squashed commit. "
$ git cherrypickHASH
$ git pushwhich is the same as
$ git push origin master
$ git push originmybranch :refs/heads/mybranch
$ git push --all
$ git push --tags
$ ls .git/refs/remotes/*
$ git remote showmylocation
$ git remote addmylocation git://mylocation /myrepository .git
$ git remote rmmylocation
$ git remote updatemylocation
$ git tag -s -m "My tag. "mytag
$ git tag -a -m "My tag. "mytag
$ git tag -a -m "My tag. "mybranch /mytag
$ git tag -a -m "My tag. "mytag HASH
$ git tag
$ git tag -mmytag mynewtag
$ git tag -dmytag
$ git push origin :refs/tags/mytag
-- Daniel Baumann <daniel@debian.org> Sun, 27 Jan 2008 10:47:00 +0100