完成向Git项目提交一次Pull requests的流程

完成向Git项目提交一次Pull requests的流程

  1. 首先查看提交的账号和邮箱是否是你要发起pr的账号,如果不是则需要进行修改
git config user.name 查看用户名
git config user.email 查看邮箱

git config --global user.name "xxx" 切换用户
git config --global user.email "xxx" 切换邮箱
  1. Githubfork别人的项目到自己的仓库,并在自己的仓库中完成克隆
git clone https://github.com/jerryjliu/llama_index.git

在这里插入图片描述

  1. 为要提交的pr创建一个分支
git checkout -b [Branch Name]

在这里插入图片描述
4. 进行更改并提交,执行 git status , 查看变更
在这里插入图片描述
5. 执行 git add 命令,将这些变更加入到刚刚创建的分支

git add .

在这里插入图片描述
6. 使用 git commit 提交这些变更

git commit -m "Adding an article to week 02 of articles of the week"

在这里插入图片描述
7. 把变更推送到GitHub

git remote 检查远程分支

git push origin [Branch Name] 提交到分支上

在这里插入图片描述
8. 创建拉取请求,在GitHub仓库中可以看到一个“Compare & pull request”按钮,点击它
在这里插入图片描述
请提供必要的说明来介绍你所做的变更(可以使用“#”来引用议题)。提交拉取请求。

恭喜!你已经成功创建了第一个拉取请求。

参考

猜你喜欢

转载自blog.csdn.net/u014297502/article/details/129524608