简体   繁体   English

Git:将分叉仓库中创建的分支添加到原始仓库

[英]Git: add branch created in forked repo to original repo

I forked a repo A to create repo B , created a new branch (let's call it b_branch ) and committed a few changes to that branch.我分叉了一个 repo A来创建 repo B ,创建了一个新分支(我们称之为b_branch )并对该分支进行了一些更改。 I'd now like to add that branch and my changes to repo A under the same branch name (eg b_branch ).我现在想以相同的分支名称(例如b_branch )添加该分支和我对 repo A的更改。 How do I do this?我该怎么做呢?

If you have write access to A repo, you can do如果你对 A repo 有写权限,你可以这样做

git remote add A <url of repo A>

git push A branch_b

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM