Useful git commands

  • Compare branches after squash merge or rebase
1
git log --graph --left-right --cherry-pick --oneline master...experiment
  • Get git log graphically with all tags/branches:
1
git log --all --decorate --oneline  --graph
  • Create or delete remote branches on push:
1
2
3
4
5
# create new remote branch on push
git push origin mybranch

# delete existing remote branch on push
git push origin :mybranch