gpt4 book ai didi

git - 如何将我的更改推送回 git 中的源代码

转载 作者:太空狗 更新时间:2023-10-29 13:31:03 26 4
gpt4 key购买 nike

我在 github 中 fork 了一个项目,然后在这个项目上做了一个 git clone 以将所有源代码获取到我的机器上。

我对源代码做了一些修改,我的问题是:-

  1. 如何将我的更改提交到本地 git 存储库以及我在 github 中的 fork 存储库?
  2. 原始源代码的作者将如何从 github 的分支存储库中 pull 我的更改

最佳答案

  1. How to commit my changes to the local git repository as well as my forked repository in github?

要为提交添加文件更改,请使用以下命令。

git add .

然后,进行本地提交

git commit

完成本地提交后,您可以将其推送到远程 GitHub 分支。

git push
  1. How will the author of the original source code, pull my changes from the forked repository in github

要让您的源代码被原始分支 pull ,您必须向项目所有者发送 pull 请求

  1. 转到您在 GitHub 上的 fork 项目的网页。
  2. 点击页面右上角的 pull 请求按钮
  3. 通过更改提交按钮选择您要提交的提交。
  4. 写下您的更改、评论等的一些描述。
  5. 发送 pull 请求并等待所有者回复。

关于git - 如何将我的更改推送回 git 中的源代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7036193/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com