How to create a local branch from an existing remote branch?

you want to create branch on base of remote-A, make changes on it and then push them on remote-A?

git checkout -b remote-A
git pull origin remote-A
git checkout -b remote-B

make changes on remote-B

 git commit -a -m 'describe changes on remote-B branch'

 git checkout remote-A  
 git merge remote-B  
 git push origin remote-A

Leave a Comment