Clone
2
从gerrit的项目,给gitea上同步代码时候的命令。
admin edited this page 2025-12-23 15:17:24 +08:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

先设置远程链接的命令提交完成后再恢复之前的uri。

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (hotfix-crash) $ git checkout master Switched to branch 'master' Your branch is up to date with 'origin/master'.

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (master) $ git remote -v

origin ssh://rw0067680@101.43.95.130:29418/zhini_im (fetch) origin ssh://rw0067680@101.43.95.130:29418/zhini_im (push)

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (master) $ git remote set-url origin http://101.43.95.130:3001/admin/zhini_im.git

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (master) $ git remote -v origin http://101.43.95.130:3001/admin/zhini_im.git (fetch) origin http://101.43.95.130:3001/admin/zhini_im.git (push)

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (master) $ git push origin master warning: use of unencrypted HTTP remote URLs is not recommended; see https://aka.ms/gcm/unsaferemotes for more information. Enumerating objects: 3326, done. Counting objects: 100% (3326/3326), done. Delta compression using up to 8 threads Compressing objects: 100% (2138/2138), done. Writing objects: 100% (3326/3326), 156.91 MiB | 10.75 MiB/s, done. Total 3326 (delta 922), reused 3326 (delta 922), pack-reused 0 (from 0) remote: Resolving deltas: 100% (922/922), done. remote: . Processing 1 references remote: Processed 1 references in total To http://101.43.95.130:3001/admin/zhini_im.git

  • [new branch] master -> master

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (master) $ ^C

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (master) $ git remote set-url origin ssh://rw0067680@101.43.95.130:29418/zhini_im

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (master) $ git remote -v

origin ssh://rw0067680@101.43.95.130:29418/zhini_im (fetch) origin ssh://rw0067680@101.43.95.130:29418/zhini_im (push)

Lenovo@DESKTOP-VRME5EA MINGW64 /e/rjb/zhini_im (master)