d4xntg
Last Updated: February 25, 2016
·
8.16K
· bendihossan
A06c38dd3377bbc0db360c44a2969fed

"Merge remote-tracking branch..." What is this? I don't even.

This happens when git pull run before creating a commit and pushing it. The pull does a fetch + merge of the latest code from origin and merges yours in.

Avoiding this can help make the log clearer and easier to review, do this by:

# download the latest commits
git remote update -p

# update the local branch
git merge --ff-only @{u}

# if the above fails with a complaint that the 
# local branch has diverged:
git rebase -p @{u}

Beware: git rebase might not do what you expect it to do, so review the results before pushing. For example:

git log --graph --oneline --decorate --date-order --color --boundary @{u}..

Source and further explanation on the problem and these commands: http://stackoverflow.com/a/6406947/694629

Say Thanks
Respond

1 Response
Add your response

7576
3d6cf87db87992c185ac03432dbaf986

This way is better than git pull --rebase, thanks for sharing.

over 1 year ago ·