Changing the Git remote 'push to' default

后端 未结 11 1924
失恋的感觉
失恋的感觉 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条回答
  •  猫巷女王i
    2020-12-04 06:11

    In my case, I fixed by the following: * run git config --edit * In the git config file:

    [branch "master"]
    remote = origin # <--- change the default origin here
    

提交回复
热议问题