2

I forked binux/pyspider and made some change.Today I found a bug and want to commit a fix to the owner.
I have 4 commit for now, the last commit contain two files(one file to fix bug, one file my edit).
And I found the most easy understanding way by John Naegle.
But I got error here:

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

I run the command under my pyspider clone folder, is it wrong? Does that means I have to revert changes of scheduler.py and add them back after I switch to master branch? Could I just add pyspider/webui/result.py to the pullrequest branch without influence to mater brach?
Should I go to a new folder to create and get this new branch? I am not very familiar with git, I fear I would do something wrong..

Community
  • 1
  • 1
Mithril
  • 12,947
  • 18
  • 102
  • 153

1 Answers1

1

Now I know Git is very powerful:
1. create a new branch and make change, would not affect other branches.
2. I can create branch with a SHA key (every commit has a unique key)

I have made my first the pullrequest, it's feel good.

Mithril
  • 12,947
  • 18
  • 102
  • 153