AZ.dev

Git

Version control commands, workflows, and common fixes

How-To Guides

Undo the last commit but keep the changes
Reset the last commit while keeping all changes staged and ready to re-commit.
resetundocommitsoft
Stash work in progress including new, untracked files
git stash alone leaves new files behind.
stashuntrackedwipbranches
Find the commit that broke something with git bisect
Binary-search the history between a known good commit and a known bad one until git names the commit that introduced the problem.
bisectdebuggingregressionhistory
List all git-ignored files and folders in a repo
Get a flat list of every file and folder git is currently ignoring: Why This Command --exclude-standard tells git to apply the full three-tier ignore stack: .gitignore, .git/info/exclude, and your...
gitgitignoreignored-filesls-filesstatus