DEV Community

loading...

Discussion on: A Git Cheatsheet Of Commands Every Developer Should Use

Collapse
bew profile image
Benoit de Chezelles

Nice cheatsheet!

For git status you say Files changed in working directory, I think it's wrong, git status gives you the status of the current branch and the files of the whole repo, not just the working directory! For working directory status, you'd do git status .

Also checkout the subcommand git worktree (and its various options), I use it a lot to check something in another branch, review whole branches for a pr of someone else, or other cases. It allows me to have 2+ branches checked out at the same time, sharing the history graph!