Reputation: 5655
I have created a new commit, but forgot to pull before that. (I should have used git stash
and than git pull
.) Now if I git pull
, I get an additional commit "merge origin/<branch> to <branch>" (Some commits have already been pushed by some other colleagues.), which I don't want.
Is there any way to do git pull
without merging?
Upvotes: 1
Views: 2950
Reputation: 22070
If you already did that commit accidentially, then follow this workflow:
Upvotes: 4
Reputation: 53482
git pull
is essentially git fetch
followed by git merge
, so if you want a pull without the merge, just do git fetch
.
Upvotes: 4