DEV Community

Cover image for Five Git Config Settings Every Dev Needs

Five Git Config Settings Every Dev Needs

Nick Taylor on February 10, 2026

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...
Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

git config --global pull.rebase true

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.

Collapse
 
nickytonline profile image
Nick Taylor

Stephen Colbert saying Awesome Sauce

Collapse
 
harsh2644 profile image
Harsh

Nick, I've been using Git for over a year and somehow never knew about pull.rebase = true until 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. 🙏

Collapse
 
nickytonline profile image
Nick Taylor

Thanks for giving it a read and glad you found it useful! Fun fact. I used to work at DEV!

Geordi Laforge in a sweater saying “No problem”

Collapse
 
nedcodes profile image
Ned C

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.

Collapse
 
nickytonline profile image
Nick Taylor

That one’s in there too at the end! Love rerere!

Collapse
 
nedcodes profile image
Ned C

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.

Collapse
 
trinhcuong-ast profile image
Kai Alder

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 a master branch that doesn't match your remote's default.

Collapse
 
nickytonline profile image
Nick Taylor

Thanks for giving it a read! Yeah, much cleaner diffs.

A kangaroo playing an electric guitar

Collapse
 
netnavi profile image
Ahmad Firdaus

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

Collapse
 
nickytonline profile image
Nick Taylor

BB-8 giving a thumbs up

Collapse
 
shitij_bhatnagar_b6d1be72 profile image
Shitij Bhatnagar

Hi, thanks very useful guide here.

Collapse
 
nickytonline profile image
Nick Taylor

Glad you found it helpful!

Hot Rod saying Cool beans!

Collapse
 
shitij_bhatnagar_b6d1be72 profile image
Shitij Bhatnagar

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.

Thread Thread
 
nickytonline profile image
Nick Taylor

Kirk and Bones nodding to each other in Star Trek

Collapse
 
andypiper profile image
Andy Piper

Always learning new stuff from you, Nick! Nice tips here.

Collapse
 
nickytonline profile image
Nick Taylor

Thanks for giving it a read Andy! Hope all is well. 😎

BB-8 giving a thumbs up

Collapse
 
0xshubhamsingh profile image
Shubham Singh

useful!

Collapse
 
nickytonline profile image
Nick Taylor

Noice!

Noice!

Collapse
 
javz profile image
Julien Avezou

I painfully remember fixing the same conflict again and again after a big merge. Rerere could have saved me a lot of pain. Good to know!

Collapse
 
nickytonline profile image
Nick Taylor

The More You Know NBC TV campaign video capture

Collapse
 
gabitchov profile image
PASCUAL Gabriel

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.

Collapse
 
nickytonline profile image
Nick Taylor

Thanks for reading Pascual and glad you found some new additions for your git config!

Captain America saluting