git 向项目所有者提交修复
git commit fix to project owner
我分叉 binux/pyspider 并做了一些 change.Today 我发现了一个错误并想向所有者提交修复。
我现在有 4 个提交,last commit 包含两个文件(一个文件修复错误,一个文件我的编辑)。
我找到了最容易理解的方式 by John Naegle.
但是我在这里遇到错误:
mithril@KASIM /E/Project/pyspider (master)
$ git checkout pullrequest
Switched to branch 'pullrequest'
mithril@KASIM /E/Project/pyspider (pullrequest)
$ git pull https://github.com/binux/pyspider.git
From https://github.com/binux/pyspider
* branch HEAD -> FETCH_HEAD
Already up-to-date.
mithril@KASIM /E/Project/pyspider (pullrequest)
$ git branch
master
* pullrequest
$ git cherry-pick 6b8fc09133b11ff8f243cdcf90fa559ee9cf4f26
error: could not apply 6b8fc09... fix pymongo dump error
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
mithril@KASIM /E/Project/pyspider (pullrequest|CHERRY-PICKING)
$ git diff
diff --cc pyspider/scheduler/scheduler.py
index 48a7888,a2f5aaf..0000000
--- a/pyspider/scheduler/scheduler.py
+++ b/pyspider/scheduler/scheduler.py
我运行我的pyspider clone文件夹下的命令,有错吗?
这是否意味着我必须还原 scheduler.py
的更改并在切换到 master 分支后将它们添加回去?
我可以将 pyspider/webui/result.py
添加到 pullrequest 分支而不影响 mater 分支吗?
我应该去一个新文件夹来创建并获取这个新分支吗?
我不是很熟悉git,我怕我做错了..
现在才知道Git很厉害:
1. 新建一个分支进行修改,不会影响其他分支。
2. 我可以用 SHA key
创建分支(每个提交都有一个唯一的键)
我做了第一个pullrequest,感觉不错
我分叉 binux/pyspider 并做了一些 change.Today 我发现了一个错误并想向所有者提交修复。
我现在有 4 个提交,last commit 包含两个文件(一个文件修复错误,一个文件我的编辑)。
我找到了最容易理解的方式 by John Naegle.
但是我在这里遇到错误:
mithril@KASIM /E/Project/pyspider (master)
$ git checkout pullrequest
Switched to branch 'pullrequest'
mithril@KASIM /E/Project/pyspider (pullrequest)
$ git pull https://github.com/binux/pyspider.git
From https://github.com/binux/pyspider
* branch HEAD -> FETCH_HEAD
Already up-to-date.
mithril@KASIM /E/Project/pyspider (pullrequest)
$ git branch
master
* pullrequest
$ git cherry-pick 6b8fc09133b11ff8f243cdcf90fa559ee9cf4f26
error: could not apply 6b8fc09... fix pymongo dump error
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
mithril@KASIM /E/Project/pyspider (pullrequest|CHERRY-PICKING)
$ git diff
diff --cc pyspider/scheduler/scheduler.py
index 48a7888,a2f5aaf..0000000
--- a/pyspider/scheduler/scheduler.py
+++ b/pyspider/scheduler/scheduler.py
我运行我的pyspider clone文件夹下的命令,有错吗?
这是否意味着我必须还原 scheduler.py
的更改并在切换到 master 分支后将它们添加回去?
我可以将 pyspider/webui/result.py
添加到 pullrequest 分支而不影响 mater 分支吗?
我应该去一个新文件夹来创建并获取这个新分支吗?
我不是很熟悉git,我怕我做错了..
现在才知道Git很厉害:
1. 新建一个分支进行修改,不会影响其他分支。
2. 我可以用 SHA key
创建分支(每个提交都有一个唯一的键)
我做了第一个pullrequest,感觉不错