Last active
June 30, 2017 10:09
-
-
Save beli-sk/845db5fec95f4df7e738c31de85161bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show commit tree (possibly append --all for all branches) | |
git log --graph --oneline --decorate | |
# save previous as an alias and then just use 'git tree' | |
git config --global alias.tree "log --graph --oneline --decorate" | |
# restoring lost commit (e.g. after git reset --hard HEAD~1) | |
git fsck --lost-found | |
# or | |
git reflog | |
git merge <hash> | |
# delete branch (remote and local) | |
git push origin --delete <branch_name> | |
git branch -d <branch_name> | |
# if branch has unmerged commits, force delete with '-D' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment