Git Revision Syntax/Follow renamed file history

Continue file history across renames.

Section: Special Selectors and Search

Follow renamed file history

bash
bash
git log --follow -- path/to/file

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Special Selectors and Search
Youngest commit by message
Find youngest reachable commit with matching message text.
OpenIn sheetbashsame section
Search all refs by message
Find commits across all refs matching message text.
OpenIn sheetbashsame section
Topological ordering
Display commit graph respecting topology.
OpenIn sheetbashsame section
List commits with parents
Include parent IDs in output.
OpenIn sheetbashsame section
Show file at HEAD
Print file content from a revision.
OpenIn sheetbash2 tag match
Show file from branch
Read file content from another branch.
OpenIn sheetbash2 tag match