DEV Community

Discussion on: Push to a forked pull request branch on GitHub—Am I doing this right?

Collapse
 
nikoheikkila profile image
Niko Heikkilä

You could also push with git push -u andy his-branch-name which would set the upstream correctly for future pushes.

It doesn't necessarily make it any easier, though. Perhaps, GitHub flow is not the best solution to this and you two should just open a pair-coding session with VS Code Live Share or similar tool.

Collapse
 
erikthered profile image
Erik Nelson

Setting the upstream branch was what came to mind for me too. You can also setup the branch to track when you initially check it out:

git checkout -b my-branch-name andy/his-branch-name