I have a situation where I need to create my branch(Say BranchB) out of a different branch(say BranchA) that is not merged yet. BranchA is up for gerrit review and modification goes on everytime in that branch.
If I go to gerrit UI, I am able to see the download dropdown on topmost righthand corner. Clicking which gives me an option to checkout. The command is something like,
git fetch ssh://**@**gerrit..****:12345/project-repo refs/changes/02/89765/15 && git checkout FETCH_HEAD
Using this I created my own local branch i.e BranchB and I also have the code from BranchA. Now the other person who works on BranchA, posted some updates which is necessary for me as well and I wanted to do git pull --rebase
. But it didn't work. It asks me to specify the branch I want to pull. I tried doing a git fetch --all
to update all remote branches in my local and tried to do git pull --rebase
again. Didn't work either.
What is the solution and the ideal way to create branches in situations like this.