开发者

Git push everything to new origin

开发者 https://www.devze.com 2023-04-09 21:07 出处:网络
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 eve开发者_运维问答rything into the new origin(works with git 1.8.4)

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 eve开发者_运维问答rything into the new origin


(works with git 1.8.4)

If you want to push all branches at once:

git push <URL> --all

To push all the tags:

git push <URL> --tags


git remote add origin <address>
git push origin <branchname>


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


git push new_remote_name branch_name

0

精彩评论

暂无评论...
验证码 换一张
取 消