DEV Community

Tom
Tom

Posted on

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.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more