Changing the Git remote 'push to' default

后端 未结 11 1921
失恋的感觉
失恋的感觉 2020-12-04 05:35

I want to change the Git default remote branch destination so I could just

git push

Instead of:

git push upstream
         


        
11条回答
  •  长情又很酷
    2020-12-04 05:59

    To change which upstream remote is "wired" to your branch, use the git branch command with the upstream configuration flag.

    Ensure the remote exists first:

    git remote -vv

    Set the preferred remote for the current (checked out) branch:

    git branch --set-upstream-to

    Validate the branch is setup with the correct upstream remote:

    git branch -vv

提交回复
热议问题