Commit ↔ snapshot of file/Code state, with UID SHA hash
aka Commits
Head
most recent Commit
Commit History
log of previous Commits
References
Commit History↔ log of previous Commitsgit commit -m "init"↔ to Commit with msg of initgit commit -am "_change"↔ toaddWorking Dir & Commit with msg of _changegit reset _SHA↔ toresetto previous Commit with_SHAUID in Mixed Moderevert↔ to safely undo bad Commit via new Commit & keep Commit Historygit commit --amend _new↔ to fix previous Commit with_newnamegit rebase master --interactive↔ to controlrebaseMaster Branch via interactive doc editor topick&squashCommitsgit commit --amend --no-edit↔ to fix & update previous Commit with extra Staging file (aftergit add .)bisect↔ to walk through Commit History via Binary Search to find good/bad Commitsgit rebase -i --autosquash↔ torebase& autosquashevery CommitMixed Mode↔ (default) behavior to move to prev Commit but NOT del filesundo to most recent [**_Commit_**](commit) AND del [Diff](diff)↔gitreset --hardHEADgit bisect start↔ to startbisectat last known working Commitgit bisect good↔ to mark Commit as good & continuebisectgit bisect bad↔ to mark Commit as bad & continuebisectgit reset HEAD~↔ to undo last Commit & keep Diffgit reset --soft HEAD~1↔ to undo Commit & keep Diff in Staging indexgit reset --soft HEAD↔ to undo (& delete) last Commit & keep Diff. 💡 best to just click the undo last commit option in VSC Source Control Panelgit push --force origin __branch↔ topushlocal Commit toremoteRepo & FORCE sync to local (discardremotehistory) 🔥 bad for teamwork!git push --force-with-lease origin __branch↔ to push local Commit to remote Repo & SAFELY sync (avoid overwrite remote history) ✅ often mandatory to not get fired!Conflict↔ when 2 Commits to Merge overwrite same file, git unsure which Branch to keep