简体   繁体   English

如何将 git fork 的更改合并到我的 repo 的 master 中?

[英]How do I merge changes of a git fork into master of my repo?

I have a repository on Github and someone has forked it and made changes (that have helped improve the repository).我在 Github 上有一个存储库,有人对其进行了分叉并进行了更改(这有助于改进存储库)。 Is there a git command that will allow me to take those changes made by the other user and modify my original master repo to match that forked repository?是否有git命令允许我接受其他用户所做的更改并修改我的原始主存储库以匹配该分叉存储库?

option 1: Use GitHub's Pull Request mechanism选项 1:使用 GitHub 的 Pull Request 机制

Pull Requests were designed especially for this purpose: making it easier for beginners and non-git experts to accept contributions from forks.拉取请求是专门为此目的而设计的:让初学者和非 git 专家更容易接受来自分叉的贡献。

See also:也可以看看:

option 2: setup the forked repo as a remote选项 2:将分叉的 repo 设置为远程

The other option is to setup the fork as an additional remote and fetch/pull from it.另一种选择是将分叉设置为附加遥控器并从中获取/拉取。 But that is more advanced and you sound like a beginner.但这是更高级的,你听起来像个初学者。

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

相关问题 如何将主存储库的更改合并到我自己的更改? - How do I merge the master repo's changes to my own? 如何在git中本地合并master和fork? - How do I merge locally a master and a fork in git? Bitbucket:更新一个分支以合并主存储库的更改? - Bitbucket: Update a fork to merge changes of master repo? 如何在一个git commit中将master分支的更改合并到我的side project分支中? - How do I merge a master branch's changes into my side project branch in one git commit? 在Git中,如何使我当前的分支master或将其合并为master但强制它接受我的所有更改 - In Git how do make my current branch master or merge it to master but force it to accept all my changes 如何分叉和Git仓库到我的仓库 - How to fork and a Git repo to my repo 如何将 branchA 的 branchB 合并到 Git 中的 Master 中? - How do I merge my branchB of branchA into Master in Git? 如何在Github上重播从原始repo到我的fork的更改? - How do I replay the changes from the origin repo into my fork on Github? 自分支首次创建以来,如何保持Git中的合并不会覆盖我所有主服务器的更改? - How do I keep merge in Git from overwriting all my master's changes since the branch was first created? 如何将我现有的回购推送到另一个回购的分支? - How do I push my existing repo to a fork of another repo?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM