Sam
Sam

Reputation: 151

Is there a way to compare file history with the current HEAD using GitLens?

I am using GitLens file history in VSCode to view older file commits. When I click on a file, I get a comparison between the commit I clicked and the immediate predecessor commit. Whilst this is useful in specific use cases, for me being able to click a files historical commit and compare it to the current HEAD is far more valuable. Is there a way to make this the default behaviour?

I can open the comparison tab and split it, and then open the current file (which means there are a total of 3 tabs open), but this is not optimal.

Upvotes: 0

Views: 92

Answers (1)

Sam
Sam

Reputation: 151

solution

If anyone comes across this question, the answer I was looking for in Gitlens: File History was "Open Changes with Working File" which is achieved with the button above. It will compare the commit you choose to your current working copy.

Upvotes: 0

Related Questions