Figure out the following
___ you created a new branch, call it "branch-01"
/
master branch __/_______________________
now it depends how you did move on from there and how you did want to move on from there cause there are 2 different scenarios.
Scenario 1:
You created a PR branch-01 which contains a few commits containing all the work which needs to be merged back to master. But needs a review so it's like on hold.
Scenario 2:
You created a PR branch-01 which contains a few commits containing some work. Now you need those changes to continue the next work. So what you do now is if you are on branch-01 you do git checkout -b branch-01-next-steps
now the branch branch-01-next-steps will have the previous work from branch-01 because you created a new branch from there. So this branch is on top of branch-01, looking like so
______branch-01-next-steps______
/
____branch-01___/
/
master branch __/_______________________
Maybe that's what you want and need. But maybe you need a "fresh" new branch from master. What you have to do then is first git checkout master
now you are on your local master branch. From there you can do git checkout -b next-steps
which will then look like
__branch-01..(waiting) ___next-steps
/ /
master branch __/___________________________________/________
if you need to get changes from master which have been merged on remote before you start working on next-steps you have first to go to master git checkout master
then type git pull origin master
and then git checkout -b next-steps
now next-steps will contain the newest changes from remote master.
You can always go back to branch-01 with git checkout branch-01