My git cheat sheet
  • Introduction
  • general workflow of git
  • general
  • studying?!
  • remote branch
  • git rebase?!
  • git pull/push
  • update a branch from the upstream
  • undo
  • git delete
  • 403, deny the push
  • git how to list all commit for one file
  • abort
Powered by GitBook
On this page

Was this helpful?

git how to list all commit for one file

Previous403, deny the pushNextabort

Last updated 5 years ago

Was this helpful?

The--followworks for a particular file

git log --follow filename

Difference to other solutions given

Note that other solutions includegit log path(without the--follow). That approach is handy if you want to track e.g. changes in adirectory, but stumbles when files were renamed (thus use--follow filename).

https://stackoverflow.com/questions/3701404/list-all-commits-for-a-specific-file