git- Creating a branch which will be pushed to a remote later

后端 未结 3 625
悲哀的现实
悲哀的现实 2021-01-12 01:45

I have a script which automatically creates a new branch with a name based on external information (JIRA ticket). I don\'t want to create the remote branch until I\'ve commi

3条回答
  •  礼貌的吻别
    2021-01-12 02:12

    You can use the -u option when you push to track your local branch

    git push -u origin myBranch
    

    http://csurs.csr.uky.edu/cgi-bin/man/man2html?1+git-push

提交回复
热议问题