git同时发布至多个远程

  1. 查看当前远程
MJJ@MJJ MINGW64 /d/Documents/Code/Body/DDBody (master)
$ git remote -v
origin  http://git.****/AI/DDBody.git (fetch)
origin  http://git.****/AI/DDBody.git (push)
  1. 添加新远程
MJJ@MJJ MINGW64 /d/Documents/Code/Body/DDBody (master)
$  git remote set-url --add --push origin [email protected]:MolianWH/VirtualBot.git
  1. 再次查看
MJJ@MJJ MINGW64 /d/Documents/Code/Body/DDBody (master)
$ git remote -v
origin  http://git.****/AI/DDBody.git (fetch)
origin  [email protected]:MolianWH/VirtualBot.git (push)
  1. 添加被修改的Push原链接
MJJ@MJJ MINGW64 /d/Documents/Code/Body/DDBody (master)
$  git remote set-url --add --push origin http://git.****/AI/DDBody.git
  1. 查看是否添加成功
MJJ@MJJ MINGW64 /d/Documents/Code/Body/DDBody (master)
$ git remote -v
origin  http://git.****/AI/DDBody.git (fetch)
origin  [email protected]:MolianWH/VirtualBot.git (push)
origin  http://git.****/AI/DDBody.git (push)
  1. push
MJJ@MJJ MINGW64 /d/Documents/Code/Body/DDBody (master)
$ git push origin
Enumerating objects: 58, done.
Counting objects: 100% (58/58), done.
Delta compression using up to 8 threads
Compressing objects: 100% (50/50), done.
Writing objects: 100% (58/58), 26.18 MiB | 170.00 KiB/s, done.
Total 58 (delta 14), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (14/14), done.
To github.com:MolianWH/VirtualBot.git
 * [new branch]      master -> master
warning: redirecting to https://git.dreamdeck.cn/AI/DDBody.git/
Everything up-to-date

你可能感兴趣的:(Git,git,github)