Automatically create remote branch with git using push.autoSetupRemote

When pushing a branch that was created locally that doesn't exist in your remote as a user you'll be prompted with the statement suggesting what command to run to create the new branch in the remote:

"git push — set-upstream origin <branch-name>"

If you are tired of doing a copy paste of the command and running it. Use the git setting push.autoSetupRemote to change the default behaviour in git to automatically create the branch. 

Run the git command below to change the global setting. 

git config --global --add --bool push.autoSetupRemote true

Comments

Popular posts from this blog

How to disable auto enabled flight key using KillSwitch

Technical intro to Feature management in D365FO

Continuous integration and deployment Power platform FinOps tweaking