开发者

Git Pushing from a local branch to a remote tracking branch

开发者 https://www.devze.com 2023-03-17 03:01 出处:网络
I have a master branch and branched out from it to a build branch. I cloned this repository to a diff开发者_运维知识库erent machine.

I have a master branch and branched out from it to a build branch.

I cloned this repository to a diff开发者_运维知识库erent machine. I created a branch my_build to track the remote build branch. Now i have few commits made in my_build branch. I want to push these changes to Remote build branch.

I tried pulling from my Remote build branch and it worked.

But is there a way that i can push my commits in my_build branch to Remotes build branch?

I have a master and two branches Branch A and Branch B branched from master at the same point.

I am in Branch A and i want to push my commits to Branch B How can i do this?


I have a master and a branch A.

Cloned this to another machine.

Created another branch B made some commits in B. B is not tracking A. Now how can i push my changes from B to A.

How can i pull A's Changes to my branch B.

And i all the above cases my master and all repos are non-bare Repos.


have a look at the refspec format of git pull

git push origin branch_from:branch_to
0

精彩评论

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