Stop using pull and start using fetch/merge/rebase
When I started using git a while ago I didn't really know what was going on until I started using fetch/merge/rebase.
If you don't know how to use fetch/merge/rebase separately then I'd suggest to do exactly that. Once you know how to use them then go back to pull if you wish.
git fetch
will update your origin/*
/ remote_name/*
references.
Once you've got the commits/data locally then you can use merge/rebase accordingly.
git fetch
git checkout master
git merge origin/master
or
git rebase origin/master
Also, pull will use your branch 'tracking' information. Which I prefer not to use personally and I specify where to push to, what to merge, what to rebase every time.
I can't remember the last time I used pull :)
Written by Kristian Lewis Jones
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rebase
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#