https://github.com/k88hudson/git-flight-rules
Create a tag
git tag --sign --message "My message" my-tag
List tags
git tag -n
Delete tag
git tag -d my-tag
Push tag
git push origin my-tag
Push all tags (avoid this)
git push --tags
Save you work for later
git stash
List stashes
git stash list
Apply your latest stash
git stash apply
Apply a spesific stash
git stash apply stash@{2}
git add --patch <filename>
Make sure you have the latest master version
git checkout master
git pull
Back to your branch...
git checkout <mybranch>
Squash my branch first
git rebase -i HEAD~4
git rebase master
Commit hash: git co c71nd
Local branch: git co develeop
Remote branch: git co origin:develop
Tag: git co v1.2.3
Relative: git co origin:develop~3
git fetch origin pull/ID/head:BRANCH_NAME
ID
being the number of the PR in Github
git filter-branch --tree-filter 'rm (-rf) filename' HEAD
git checkout c81nd -- path/to/file.txt
git push origin local-name:remote-name
git reset --soft HEAD~1
git remote set-url origin [email protected]:ORG/REPO.git
All files
git reset --hard
Some files
git checkout -- file01.txt file02.txt
git fsck --full --unreachable --no-reflog | grep blob | cut -d " " -f 3 | xargs -I {} git cat-file -p {} | grep "test_create_complex_array()" -C 200