Filter git log history by file name
To review the git history of a specific file, you can use the git log
command and pass the relative path for the file in question:
git log app/models/user.rb
You can also pass the -p
flag to auto expand the diffs for the file:
git log -p app/models/user.rb
Tweet