connect local repo with remote repo

后端 未结 2 1481
春和景丽
春和景丽 2020-12-23 00:10

I have a local repo. I created the whole app but now I want to push it to remote repo. I already have remote repo as well. How can I connect these two repos without losing a

2条回答
  •  遥遥无期
    2020-12-23 00:50

    git remote add origin 
    git push --all origin
    

    If you want to set all of your branches to automatically use this remote repo when you use git pull, add --set-upstream to the push:

    git push --all --set-upstream origin
    

提交回复
热议问题