美文网首页Git
Git set upstream branch

Git set upstream branch

作者: JaedenKil | 来源:发表于2020-11-06 10:46 被阅读0次

Option 1

Normally we can set upstream branch while pushing:

// on master branch
git push -u origin master // with "-u"

or

// on master branch
git push --set-upstream origin master

In this way, we'll set a upstream branch for current local branch and push local commits to that upstream branch.

Option 2

Set upstream branch without pushing

// on master branch
git branch -u origin/master

or

// on master branch
git branch --set-upstream origin/master

相关文章

网友评论

    本文标题:Git set upstream branch

    本文链接:https://www.haomeiwen.com/subject/wkkavktx.html