我有一个正在处理的本地存储库,它的远程存储库托管在 GitHub 上。我最近创建了一个分支并开始处理它,进行了几次提交,现在希望将该分支推送到 GitHub 并能够将其 pull 到另一个克隆的存储库。我该怎么做?
最佳答案
git push origin <local-branch-name>:<remote-branch-name>
替代<local-branch-name>
和 <remote-branch-name>
.它们可以相同或不同,如您所愿。
关于git - 推送分支到 Git,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1072261/