Show a file at a specific commit
Print a file's content as it was in an older commit
git show <sha>:path/to/file
More git commands
-
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
-
git push origin --delete feature/old-branchRemove a branch from the remote repository (origin)
-
git clean -fdxDelete untracked files and directories, including ignored ones. There is no undo