Reputation:
I pulled a remote branch. I made some changes. I want to push my local changes back to my remote branch (not master)
Here's the commands I used to pull
git remote add my-desktop ssh://mydomiain.com/usr/local/me/myproject
git fetch my-desktop
git branch some-feature-mylaptop my-desktop/some-feature
git checkout some-feature-mylaptop
now I edit, git commit, and want to push the changes from some-feature-mylaptop back to my-desktop/some-feature. Tried 'git push origin my-desktop' that didn't work. Tried 'git push my-desktop some-feature-mylaptop'. That just made a new branch on mydesktop call 'some-feature-mylaptop'
Upvotes: 2
Views: 1326
Reputation: 14787
git push my-desktop some-feature-mylaptop:some-feature
With local-branch:remote-branch
syntax you are effectively saying that git should push your local-branch
on top of remote remote-branch
. You could read about it here
Upvotes: 2