Show PR-like commits log in Magit
What's PR like commits log?
When we submit a new merge request on GitLab (or a pull request on GitHub, the UI is alike), it will show us a nice commits log only contains commits introduced in the Source Branch.
It's extremely helpful for code review, since it keeps us focused on the new commits and nothing else.
How to get the same results in Magit?
It would be great if we can do the same thing in Magit so that we can use the same review workflow on local.
Magit does not provide an action to do this directly in
magit-log-popup
.
But since GitLab, GitHub, Magit are just simple wrappers for Git commands, it turns out to be pretty simple to get the same result.
Git command for showing the new commits
git log <target_branch>..<source_branch>
- Magit
- Call
magit-log
or invokeLog other
inmagit-log-popup
- Type in
<target_branch>..<source_branch>
- Call