Yet another merge? Replay your commits instead
Sometimes you work on your local copy, commit several changesets and are ready to push... just to find out someone else has pushed already.
To keep your repo's history neat, instead of pulling and merging upstream changes, you can do a rebase:
git pull --rebase origin master
This pulls the latest changes and replays your commits on top of them. No more "Merge branch 'master' of ..." messages polluting your history.
Written by José Sazo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#