---
# System prepended metadata

title: "\U0001F422 Git 設定一次 Push 至多個 Remote Repository"
tags: [Git]

---

# 查詢設定
```shell=
git remote -v
```
```shell=
//原始設定
origin  git@github.com-chiisen:chiisen/logseq.git (fetch)
origin  git@github.com-chiisen:chiisen/logseq.git (push)
```
# 新增 Repository
```shell=
// 新增
git remote set-url --add --push origin git@github.com-chiisen:chiisen/logseq.git

git remote set-url --add --push origin git@github.com:edwin45168899/logseq.git

git remote set-url --add --push origin git@github.com-edwiin1688:edwiin1688/logseq.git

// 如果要刪除如下
git remote set-url --delete --push origin git@github.com-chiisen:chiisen/logseq.git

git remote set-url --delete --push origin git@github.com:edwin45168899/logseq.git

git remote set-url --delete --push origin git@github.com-edwiin1688:edwiin1688/logseq.git
```

```shell=
git remote set-url --add --push origin git@github.com-chiisen:chiisen/obsidian.git

git remote set-url --add --push origin git@github.com:edwin45168899/obsidian.git

git remote set-url --add --push origin git@github.com-edwiin1688:edwiin1688/obsidian.git
```

# 檢查新增 Repository
```shell=
git remote -v
```
```shell=
// 新增後的設定
origin  git@github.com-chiisen:chiisen/logseq.git (fetch)
origin  git@github.com:edwin45168899/logseq.git (push)
origin  git@github.com-chiisen:chiisen/logseq.git (push)
origin  git@github.com-edwiin1688:edwiin1688/logseq.git (push)
```
# Push(推送)多個 Repository
```shell=
git push origin
```
```shell=
Everything up-to-date
Everything up-to-date
Everything up-to-date
```
