开发者

git push one branch back to original remote branch

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开发者_如何学C-feature-mylaptop'


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜