Git push everything to new origin

前端 未结 4 616
眼角桃花
眼角桃花 2021-02-02 08:56

I deleted my previous git origin, and created a new one. I did git add . and git commit. But it will update changes, how do i push everything into the new origin

4条回答
  •  生来不讨喜
    2021-02-02 09:09

    Hmmmm I just did this. I am not sure if you did exactly the same but I had a different method.

    I setup a bare repo on "newserver" (using ssh). Had the full clone of the repo on my laptop.

    I then did:

    git remote set-url origin "newservers url"
    git push origin master
    

提交回复
热议问题