"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
Written by Steffan Harries
Related protips
1 Response
This way is better than git pull --rebase
, thanks for sharing.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Code
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#