git --help git <command> --help
git commit -am wip git commit -m "Initial commit" --allow-empty git commit --amend --allow-empty --no-edit
git log upstream/develop...my-pr ^my-other-pr git log develop --oneline --merges git reflog | grep 'moving from' | awk '{print $1,$6}' | head -n40 git reflog WONDERLAND
git checkout upsream/release/v2.12 -- src/ggrc_risks git checkout . git reset . git log --oneline srg/ggrc/app.py git diff upstream/release/v2.13...upstream/release/v2.14 -- src/ggrc/migrations/ git ls-files "*.py" | xargs flake8
But not all
git reset --hard
git add . # customize as you wish git diff --staged > changes.patch git apply changes.patch
Or send full commits
git bundle create my-changes.bundle upstream/develop...HEAD git bundle unbundle my-changes.bundle git checkout 68335330d6ec880fc6998d123b577b1a4f626c78 git checkout -b my-branch
You can also pick and choose
git cherry-pick <hash>
git blame <file>
Preferably use your IDE/editor integration (:Gblame in fugitive) Then fix the damn thing right there.
git add . git commit --fixup=<hash>
When done
git rebase upstream/develop -i --autosquash
git clean -xdf git show upstream/release/v2.13:src/ggrc/app.py git checkout - git checkout --detach watch -cn1 'git grep --color -e "import ggrc.app" -e "from ggrc import app" -e "from ggrc.app" | grep -v unit '
git gui gitk tig