jkj2000
jkj2000

Reputation: 1593

Pushing same git changes to multiple branches

I forked a github repo and would like to update an open pull request on the main repository. Before doing that however I want to do a dry run on my local box to make sure things will go smoothly when someone builds this project after the pull request is merged.

I'm not sure how to test this scenario however? I'm debating whether I should create a new branch on my forked repo, stage my changes and push to it.

From there, if I go to my local copy of the original repo and pull from my forked repository/new branch and try building, that should cover me?

If so, my question is how do I then update my original pull request with the changes I pushed to my forked repo's new branch? I've already staged and pushed them to the new branch, is there a way to 're-push' them to my original branch, so the pull request is updated?

Maybe I'm way off and there's a better approach to all this, in which case I'm all ears. Thank you.

Upvotes: 1

Views: 65

Answers (1)

VonC
VonC

Reputation: 1323683

I'm debating whether I should create a new branch on my forked repo, stage my changes and push to it.

That is the generally accepted best practice: isolate your change in a branch that you:

Upvotes: 1

Related Questions