3 ms·
Along the same lines: when I want to locally review someone’s PR, I want to see their changes as “dirty” relative to main, so that the changes show up nicely hi
by d4rkp4ttern 3y ago
Along the same lines: when I want to locally review someone’s PR, I want to see their changes as “dirty” relative to main, so that the changes show up nicely highlighted in PyCharm in the “gutter” (left side). This has to be such a common need, but I am surprised that I have to do convoluted things like: create a new branch, switch to it, and then:
git merge --no-commit --no-ff pr-branch
Am I missing an easier workflow/command to achieve the above?
(Granted this is not so bad, and was suggested by GPT4, but I wondered if there might be a more straightforward way)
- xvilka 3y agoI recommend trying b4[1] tool. [1] https://b4.docs.kernel.org/en/latest/index.html https://b4.docs.kernel.org/en/latest/index.html
- foundart 3y agoHere's a script I use for this. It's designed for use with github. Run it in your copy of a repo with a PR number and it will create a 'review' branch that has the changes uncommitted. Works great with IDEs with a good diff experience. https://github.com/whenceforth/local-code-review https://github.com/whenceforth/local-code-review
- jauco 3y agoIn vs code you check out the pr branch and then do cmd-shift-p “show differences with” and then select “main”
- d4rkp4ttern 3y agoI don’t use vscode, but does this show the diffs in the gutter within the IDE ? Or does it simply display the diffs in a separate pane?