问题描述
我一直在研究远程git仓库的本地克隆,将我的更改提交给本地主分支。现在,我想将我的提交推送到远程存储库。但是,我想让我的本地提交与远程主分支保持分离,这样我就不会破坏任何东西。如何将我的本地提交推送到新的远程分支? ,它会告诉你关于你推送的refspec的语法。简而言之, git push< remotename> < local_branch_name>:< remote_branch_name>
I've been working on a local clone of a remote git repository, committing my changes to my local master branch. Now, I want to push my commits to the remote repository. However, I want to keep my local commits separate from the remote master branch, so that I don't break anything. How can I push my local commits to a new remote branch?
You should run git help push
, which will tell you about the syntax for the refspec that you push to. In short, git push <remotename> <local_branch_name>:<remote_branch_name>
这篇关于将本地主提交推送到远程分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!