Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Serious question, as I've never done a PR in my IDE; hadn't even thought to.

If you check out the branch in your IDE, is there a way to have it highlight the changes in the branch you're reviewing? Or do you need to reference the output from `git diff` or the github PR view?



VS Code:

1. Open Source control window

2. Checkout the PR branch

3. Open the branches listing panel in the sidebar.

4. Mouseover the target branch of the PR

5. There's an icon that looks like two nodes with arrows pointing between them. Mouseover text "Compare with ...". Click it.

6. The search and compare panel in the sidebar has a listing of files changed, you can click a file to get a diff view.

There are gitlab [1] and github [2] extensions which streamline this workflow if your code is hosted on one of those services, and let you leave comments in editor which show up in the web UI.

IntelliJ has support for display a diff for a branch or github PR built in [3] but I hate their diff modal view.

[1]: https://marketplace.visualstudio.com/items?itemName=GitLab.g...

[2]: https://marketplace.visualstudio.com/items?itemName=GitHub.v...

[3]: https://www.jetbrains.com/help/idea/contribute-to-projects.h...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: