Can any body explain the difference between git merge origin master
and git merge origin/master
?
I did accidentally did git merge origin master
. If it is different, what is the command to reset that merge?
After my test, $git merge origin master
equals $git merge origin/HEAD master
.
This means merge two branch (origin/HEAD, master) into current branch, which is very different from $git merge origin/master
.
But as usually, master branch and origin/HEAD is in the same commit line, so these two command performs the same.
And I try the case in which master and origin/HEAD diverged, the result shown as the following with $git merge origin master
:
*-. 33f82cd (HEAD, test) merge
|\ \
| | * 46d0c92 (master) 22
| * | 9d9f51c (origin/test, origin/HEAD) 11
| |/
* | 5ecfebd (origin/master) modify 2.txt
|/
* 14949b6 remove 1.txt
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With