4 ms·
The Case for Pull Rebase
- Svoka 8y agoTL;DR: Use `git pull -r` This is it. This is whole article.
- megakemp 8y agoThere is more to it than that. Did you know about `git pull --rebase=merges` as well?
- HelloNurse 8y agoI've got used to a slight variant: staging and stashing my latest changes, pulling (with no merge, since changes are gone) and reapplying the stash. Repeatable until I'm ready to make a commit and push it.
- deleted 8y ago[deleted]
- barberousse 8y agoYou're either really mentally disciplined or have your gitconfig and scripts setup
- HelloNurse 8y agoNot really, I only have a trivial shell script to pull from about 160 mostly quiescent repositories. When a pull fails, I use SourceTree to review modified files (which, for technical reasons, are mostly spurious tool-made harmless changes that should be discarded but are usually included in commits and conflicting). Discarding, staging and stashing files and then applying a stash are particularly convenient operations with the SourceTree client (much better than merging or rebasing), and avoiding extra commits is a major advantage.
- bigpoo 8y agoBig Poo says you should always PR into the "master" branch. Never commit directly to it.