I have a local branch in my sandbox repository called local-branch which tracks a remote branch called remote-branch. I created the local branch thus:
$ git checkout -b local-branch remotes/origin/remote-branch I created a branch from the local-branch called dev-branch:
$ git checkout -b dev-branch local-branch I then committed some changes to dev-branch and now want to push it upstream to a branch off remote-branch. There it gets reviewed, approved and then merged into remote-branch. Following that, I need to git pull on my local-branch to sync it with remote-branch.
I am trying the following but this does not seem to work.
$ git push remotes/origin/remote-branch local-branch I see the following error:
fatal: 'remotes/origin/remote-branch' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. But I can see the repository when I run:
$ git branch -a
$ git push origin local-branchworks.