That’s it, I want to practice git conflict resolution.
I built a warehouse on github named p. I cloned a copy of the remote warehouse p on the D drive and F drive of my computer.
I first make modifications to the file on the D drive and submit it to the remote warehouse.
Then on drive F, I deliberately changed a file and then pulled , then git should report a conflict and let me resolve it.
But I use git pull p master:master and git pull p master, the results are different:
This is the git pull p master:master command:
dbx@dbz MINGW64 /f/zns/p (master)
$ git pull p master:master
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 4 (delta 2), reused 4 (delta 2), pack-reused 0
Unpacking objects: 100% (4/4), done.
From github.com:ak74u /p
! [rejected] master -> master (non-fast-forward)
8b34266..f8a04e8 master -> p/master
No conflict occurs
This is the git pull p master command
$ git pull p master
From github.com:ak74u/p
branch master -> FETCH_HEAD
Auto-merging html/some_shit1.html
CONFLICT (content): Merge conflict in html/some_shit1.html
Automatic merge failed; fix conflicts and then commit the result.
There is a conflict and the file has changed
Why do git pull p master:master and git pull p master get different git feedback?
For details, please see: Ruan Yifeng git tutorial