Posted by & filed under GIT.

With an installation of GIT on a new machine, the push/pull behavior I was used to has changed. I prefer that a push and pull only affects the current branch, not all of them.

To set this behavior, globally, run the following commands:

git config --global pull.default current
git config --global push.default current

Now you won’t have anymore surprise pushes of your not-quite-ready code from another branch.

Thomas Hunter II

Thomas is the author of Advanced Microservices and a prolific public speaker with a passion for reducing complex problems into simple language and diagrams. His career includes working at Fortune 50's in the Midwest, co-founding a successful startup, and everything in between.