如何将我的更改推送回 git 中的源代码
我在 github 中分叉了一个项目,然后在该项目上进行了 git 克隆,以将所有源代码获取到我的机器上。
我对源代码做了一些修改,我的问题是:-
- 如何将我的更改提交到本地 git 存储库以及 github 中的分叉存储库?
- 原始源代码的作者将如何从 github 的分叉存储库中提取我的更改
I forked a project in github and then did a git clone on this project to get all the source code to my machine.
I have made some modifications to the source code and my questions are:-
- How to commit my changes to the local git repository as well as my forked repository in github?
- How will the author of the original source code, pull my changes from the forked repository in github
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
要添加文件更改以供提交,请使用以下命令。
然后,进行本地提交,
一旦进行本地提交,您就可以将其推送到远程 GitHub 分支。
要使原始分叉提取您的源代码,您必须向项目所有者发送拉取请求。
To add files changes for commit, use the following command.
then, make a local commit by
once you make your local commit, you can then push it to your remote GitHub fork.
To make your source code pulled by original fork, you have to send a pull request to the project owner.
检查这个
使用GIT,如何选择性拉取/ 合并来自另一个“fork”的更改?
如何将我的更改提交到本地 git 存储库
git commit -m "Your Message"
如何在 github 的分叉存储库中提交我的更改?
http://www.backdrifter.com /2011/02/09/working-on-forked-projects-using-github/
http://help.github.com/fork-a-repo/
< code>原始源代码的作者如何从 github 的分叉存储库中提取我的更改
如何显示已上演的更改?< /a>
http://www.kernel.org/pub/ software/scm/git/docs/git-pull.html
http://www.kernel.org/pub/software/ scm/git/docs/everyday.html
Check this
Using GIT, how can I selectively pull / merge changes from another's 'fork'?
How to commit my changes to the local git repository
git commit -m "Your Message"
How to commit my changes in forked repository in github?
http://www.backdrifter.com/2011/02/09/working-on-forked-projects-using-github/
http://help.github.com/fork-a-repo/
How will the author of the original source code, pull my changes from the forked repository in github
How do I show the changes which have been staged?
http://www.kernel.org/pub/software/scm/git/docs/git-pull.html
http://www.kernel.org/pub/software/scm/git/docs/everyday.html
因此,我使用部署密钥( ssh )与带有用户/通行证的 http (
Repo -> Settings -> Deploy Keys
),在我
git clone
我的存储库之后,我必须手动更改(或使用 git remote 添加新的)以下内容来自:
至:
然后我确保在
ssh-add -l
(代理)中找到了我的密钥,然后我就git 推送
I'm using deployed key ( ssh ) vs http with user/pass (
Repo -> Settings -> Deploy Keys
)therefor, after i
git clone
my repo, i had to manually change ( or add new one usinggit remote
) the followingfrom:
To:
Then i made sure my key was found in the
ssh-add -l
( agent ) and then i justgit push