There are two ways to create a remote branch with git.
please replace ${name}
with your real branch name.
Create local branch, then add to remote server
- Create a new local branch
${name}
with the command below:
- Switch to your new branch
- Check Which branch you are using now:
- Now create the remote branch:
- then save the config file.
OR you can use the command to track the remote branch
Create remote branch first
- now you are using
${name}
branch
- update your branch
automate shell script
There are some automate shell script for create it.
Geoff Lane’s shell script
add this to .git/config.
then use command
windows CMD script