Show file change history
Show full diff history of a file including renames
git log --follow -p -- path/to/file.py
- tool
- git45 commands
More git commands
-
git reset --soft HEAD~1Move HEAD back one commit, keeping staged changes
-
git clean -fdRemove untracked files and directories from working tree
-
git branch --merged mainList local branches already merged into main
-
git rebase -i HEAD~5Squash, reorder, or edit the last 5 commits
-
git cherry-pick <sha>Apply a single commit from another branch