You've probably added some settings to your Git Configuration, but here are some you might not have configured. If you haven't set these up yet, yo...
For further actions, you may consider blocking this person and/or reporting abuse
Couldn't agree more with this one. Mergig has its place in git, but when pulling commits before pushing everything, 99% of the time I just want to put my work on top of the existing work.
Nick, I've been using Git for over a year and somehow never knew about
pull.rebase = trueuntil this post. 😅Just updated my global config and — wow. Why did no one tell me this sooner? No more random merge commits cluttering my history.
This is why I still read DEV in 2026. Little productivity gems like this. 🙏
Thanks for giving it a read and glad you found it useful! Fun fact. I used to work at DEV!
push.autoSetupRemote is the one that changed my life. I can't believe I spent years typing --set-upstream on every new branch.
One I'd add:
git config --global rerere.enabled true. It remembers how you resolved merge conflicts so if you hit the same conflict again (common during long-lived feature branches), Git just auto-resolves it. Saves a surprising amount of time during rebase-heavy workflows.That one’s in there too at the end! Love rerere!
ha, missed that! rerere is one of those features where once you start using it you can't go back. saved me so many times during long-running rebase sessions.
The histogram diff algorithm is one I don't see talked about enough. Switched to it about 6 months ago and the diffs on larger files are noticeably cleaner — especially when you're moving functions around.
One more I'd throw in:
git config --global init.defaultBranch main. Not a productivity thing exactly, but it saves you from that awkward moment when you push a new repo and realize it created amasterbranch that doesn't match your remote's default.Thanks for giving it a read! Yeah, much cleaner diffs.
wow this is very helpful, sometimes i need to take over some of my team git, the push auto upstream and pull reball help me alot thanks
Hi, thanks very useful guide here.
Glad you found it helpful!
ya, though my personal preference is not to use use 'git config --global push.autoSetupRemote true' to avoid flooding remote repos with feature branches, but I do believe in frequent & meaningful, compilable commits to branches.
Always learning new stuff from you, Nick! Nice tips here.
Thanks for giving it a read Andy! Hope all is well. 😎
useful!
Noice!
I painfully remember fixing the same conflict again and again after a big merge.
Rererecould have saved me a lot of pain. Good to know!Awesome config. I didn't think that I could put the prune on fetch by default. Rebase is my life with git like the "squash on merge" for integrating on main branch. Thanks.
Thanks for reading Pascual and glad you found some new additions for your git config!