Work on several branches with worktree
Check out a branch in a separate directory, no stash needed
git worktree add ../feature-branch feature/my-feature
More git commands
-
git submodule update --init --recursiveInitialize and update all submodules, including nested ones
-
git show <sha>:path/to/filePrint a file's content as it was in an older commit
-
git log --oneline --graph --decorate --all | head -40Show a compact graph of all branches in the repo (first 40 lines)
-
git log -S 'password' --oneline --allFind all commits that added or removed the string 'password'. Hopefully there are none
-
git commit --amend --no-editAdd staged changes to the last commit and keep its message