Reputation: 723
I cloned from a repo the master branch.
I made some changes to my local. Now my repo is a copy of master branch.
Henceforth I would like to commit my code to the original but not a master branch a 'test' branch.
When I would do a git pull, it'll pull changes from the master branch but I don't want that. I want changes from test branch.
If I git checkout test
, since it's a branch at the forked repo does not show up. What else could I possibly do?
Upvotes: 0
Views: 85
Reputation: 5693
If you set up a local tracking branch for the remote test
branch, then I think you could do something like (may have syntax errors):
git pull origin/test test
Upvotes: 0
Reputation: 1471
git push -u <remote> <localbranch>:<remotebranch>
so for example:
git push -u origin mybranch:mybranch
Upvotes: 2