Posts

Showing posts from January, 2024

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