git log -p filename
git diff --cached
INFO: http://stackoverflow.com/questions/1587846/how-do-i-show-the-changes-which-have-been-staged
git archive --format=tar --prefix=tomatocart/ master | gzip > tomatocart_msp_module-02-jan-2012.tar.gz
Razu jednego, przez przypadek wysłałem zmianę zawierającą hasło w jednym z plików. Oto jak usunąłem niebezpieczną linię ze wszystkich commitów. UŻYWAĆ Z ROZWAGĄ!!!
git filter-branch --tree-filter 'sed -i "" "/bind_password/d" lib/ddrive/application.rb' HEAD
INFO: http://git-scm.com/book/ch6-4.html#The-Nuclear-Option:-filter-branch
Gdy sklonujemy zdalne repozytorium, git branch -a
wyświetli nam wszystkie gałęzie. Aby pracować na takiej gałęzi należy utworzyć lokalną gałąź powiązaną ze zdalną.
git checkout -b experimental origin/experimental
INFO: http://stackoverflow.com/questions/67699/how-do-i-clone-all-remote-branches-with-git
git push <remote-name> <local-branch-name>:<remote-branch-name>
INFO: http://stackoverflow.com/questions/1519006/git-how-to-create-remote-branch
git branch branchname <sha1-of-commit> git branch branchname HEAD~3
INFO: http://stackoverflow.com/questions/2816715/branch-from-a-previous-commit-using-git
git rebase --interactive HEAD~2
INFO: http://stackoverflow.com/questions/2563632/how-can-i-merge-two-commits-into-one
git clean -f -d
INFO: http://stackoverflow.com/questions/61212/removing-untracked-files-from-your-git-working-copy
git push -u origin bug/asap-527
git log -G player_password -p
git diff --name-only feature/core-player-limits $(git merge-base feature/core-player-limits production)
git branch --sort=-committerdate