It would be very cool if GitLens supported GitHub-style "compare view" between branches. The closest to it currently in GitLens is:
Step 2 is slightly inconvenient and step 3 takes me out of VSCode entirely so it would be really cool if GitLens could support this natively. (I understand it won't be easy to fit this into the quick navigation menu but you already managed to get a ton of useful functionality there :) ).
@borekb This is a pretty big ask ;) But as I look to expand features using custom views -- I could possibly see something like this becoming a reality ;)
Though in the short-term, I might look into adding a command to jump directly to a github compare view.
Also just FYI, you can invoke the Directory Compare command at any time and it will allow you to pick the branch to compare the current branch to -- so you can avoid steps 1 & 2 above. But it will still take you out of vscode.
Thanks for at least considering it :) It would be a huge feature for me as I don't know of any other Git client that would do this well (GitHub as a web client got this "surprisingly" right).
And also thanks for the tip about the Directory Compare command. This extension just rocks :)
@borekb What are you using as your git diff tool?
I use Beyond Compare its not free - but its incredible. Its been my go to tool for comparisons for MANY years
Me too, nothing compares (ehm) to it.
Actually, after many years with TortoiseGit and Beyond Compare, I would say that VSCode + GitLens is now a Git client I use most frequently. Complex directory compares and directory graphs are still something I do outside of VSCode but those cases are becoming rarer. GitLens plays a big part in this transition, 馃憦.
@borekb Check out the latest GitLens 7 beta -- You can now select branches or commits to compare in the new GitLens Results view. Let me know what you think.
This has been released in GitLens 7
For the uninitiated, what's the correct technique for "compare this branch with its merge base"? For example, I'll often check out a branch and I just want to see how the working copy differs with git merge-base master HEAD.
Edit: for comparison, I use the following three aliases in git with difftool=meld, and that's my usual workflow for reviewing branches.
meld = difftool --dir-diff --tool=meld
meldbase = !git meld $(git merge-base origin/master HEAD)
review = !git fetch $1 $2 && git checkout FETCH_HEAD && git meldbase && true
@cdyson37 in 7.2 I added a new menu item to branches to quickly compare with its upstream as well as quickly compare the selected branch to the index (HEAD) -- I believe that should get you what you want. If not, please open a new issue to track this with more details. Thanks!
@eamodio thanks! This is a slightly different type of comparison I'm after though, so I've opened #240 .
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@cdyson37 in 7.2 I added a new menu item to branches to quickly compare with its upstream as well as quickly compare the selected branch to the index (HEAD) -- I believe that should get you what you want. If not, please open a new issue to track this with more details. Thanks!