Git Cheat-sheet

From Georgia Tech Course Software Development (https://www.youtube.com/watch?v=3a2x1iJFJWc)
  • reset is a limited version of checkout or branch -f

1. Log

alias graph="git log --all --decorate --oneline --graph"

git reflog

2. Change history in one branch:

(1) add new file without creating new commit:

git commit --amend --no-edit