idea 一套代码提交到多个git上

tech2024-01-13  78

1.点开Terminal 2.查看远程仓库,只有一个github远程仓库

git remote origin git remote -v origin https://github.com/tavatimsa/test.git (fetch) origin https://github.com/tavatimsa/test.git (push)

3.再添加一个远程仓库以gitee为例

git remote add gitee https://gitee.com/tavatimsa/test.git

4.再次查看远程仓库情况,这时就有2个远程仓库了,但push的时候需要操作2次。

git remote gitee origin git remote -v gitee https://gitee.com/tavatimsa/test.git (fetch) gitee https://gitee.com/tavatimsa/test.git (push) origin https://github.com/tavatimsa/test.git (fetch) origin https://github.com/tavatimsa/test.git (push)

最新回复(0)