Git and pull request

Hello fellow campers, I would appreciate any input on the following situation: I am awaiting for a pull request to be approved but I need to keep working on new features, if I create a new branch and then pull/push from origin main, will I lost the work done in my pull request that is awaiting approval? Thank you in advanced for you insightful input.

No, you won’t lose any work. So;

If you want to build on the work you’ve done (ie some or all of that work in that PR informs what you’re doing next).

Branch off your current branch (the one in PR) and carry on. Once finished, PR against the current branch. If that branch has been approved and merged in the meantime, then if you’re using GitHub/similar, then the PR will automatically switch to being the main branch you’re merging into. Means you have a branch of a branch, but you don’t have much choice because you’re blocked otherwise.

If it doesn’t touch any of the code in the current PRed branch.

Just make a new branch off the main one: it’ll be fine, this is what git is for.

Thank you for the detailed answer.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.