如何贡献给别人的存储库? [英] How to contribute to someone else's repository?

查看:107
本文介绍了如何贡献给别人的存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一位朋友在他的GitHub帐户中拥有一个存储库。我想直接在该回购协议中向主分支(唯一分支)提交(拉/推)。

I have a friend who has a repository in his GitHub account. I want to contribute (pull/push) to the master branch (the only branch) on that repo directly.

我会如何直接在命令行上执行此操作使用git?

How would I go about doing this directly on the command line using git?

推荐答案

由于您指定要直接将推入朋友需要在回购设置中将您添加为合作者。

Since you specified that you want to push directly to your friend's repo, your friend needs to add you as a collaborator in the repo settings.

但是,由于您对 git 缺乏经验,采用间接方法会更好:分叉回购并使用pull请求将更改移动到主库中。

However, given your inexperience with git, it would be better to take the indirect approach: fork the repo and use pull requests to move your changes into the main repo.

这篇关于如何贡献给别人的存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆