Question

I may have screwed up, but there a way to get a code review going on GitHub after I did the below workflow?

I cloned a remote repository, branched the master and made my changes. I committed the changes, merged my branch into master, then ran a sync on GitHub and the changes are there now.

I'd now like to initiate a post-checkin review, but didn't fork the repository and so can't initiate a pull request, which as I understand it now is the common way to get reviews going in github. What should my next steps be?

Was it helpful?

Solution

Next time you should just push your changes from your branch to the remote repository, then submit a "pull request" for the branch back into master where the code can be reviewed prior to merging.

When you push changes to your branch, to compare your changes, go to that branch and look for this near the top in the code tab: enter image description here

This is some good reading as well about how/when to use forking & pull requests: https://help.github.com/articles/using-pull-requests

EDIT:

And since you did say this is after the fact, the other thing you can do is go to the master branch->commits section, and click on the commit where you merged your branch in. That page allows you to make comments and view the changed files, so you can still review your code before you actually push it to your server. However, you should still do the other way next time.

OTHER TIPS

To clarify...you can branch locally and then change, commit etc, and then push that branch to GitHub, then fire off a pull request?

Yes, and since August 14th 2018, you don't even need to switch to the Code tab:

When you push branches while using the “Pull requests” tab, GitHub will now display the dynamic “Compare and pull request” widget—so you can quickly create a pull request without having to switch back to the “Code” tab.
Learn more about pull requests in our documentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top