git

TIL: Auto push new branches

ludder

Tom

Posted on September 13, 2022

TIL: Auto push new branches

Add the following line to the config file in your .git folder (or to your global git config) to auto push a new branch you've created locally:

[push]
    autoSetupRemote = true
Enter fullscreen mode Exit fullscreen mode

Now, on the first time you enter git push for a new branch your terminal won't complain that the remote doesn't exist, it just pushes your branch.

💖 💪 🙅 🚩
ludder
Tom

Posted on September 13, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related