How to view file history

Not sure if I am just doing it wrong or it is not possible with GitLab.

I just want to review all changes to a single file for the past 2 months.

Whenever I view “history” - it shows the history a the commit. When I view the file, I can see the last revision but I can’t find a way to look at the revision prior without searching through all previous commits, file by file.

Is it even possible?

2 Likes

I would also like this feature, please!

1 Like

This would be a very useful feature.

Coming from BitBucket this is one of the features that really seems to be missing. When viewing a file in BitBucket you could see the history in a pulldown (showing all the commits that changed this file) and then clicking on an item would show the changes between that revision and the previous revision. In GitLab you only have show blame (which is nice) which does not allow you to focus on specific recent changes easilly.

Hi guys,

Not sure if I understand correctly… but, if you want to see a history (list of commits) only for 1 file, it’s possible:

  1. click on the file you want to review
  2. there is a history button on the top right corner

Then you have listed history (commits) for that one file on a selected branch (which you can also change from a dropdown at the top). There is also filter by author, and search by commit message filter.

After clicking on a commit, it shows you the diff.

If you want to see history more like a live diff between different commits, I think that is not possible… I personally prefer to do that locally with a git tool like SourceTree.

The problem with that history button is that you lose the context of that specific file. It shows me the entire history (not just the things that affected that file) and then when clicking an history item it shows me the entire commit and not just that file. The pulldown in BitBucket shows only changes that affected that file and clicking on them shows the diff only for that file.

Any news on this?