Update 'Tools/Git'
+25
@@ -3,3 +3,28 @@ Git Info
|
||||
|
||||
-----
|
||||
|
||||
#### Mirroring Repos
|
||||
|
||||
This mirrors a repo to your current repo
|
||||
<details>
|
||||
|
||||
<summary>Explanation</summary>
|
||||
|
||||
`git remote add {name_of_remote} {remote_url}`
|
||||
Adds a remote to your instance under {name_of_remote} (any unique name you decide) which will mirror {remote_url} to your repo.
|
||||
|
||||
|
||||
-----
|
||||
git push origin 'refs/remotes/{name_of_remote}/:refs/heads/' --prune --tags
|
||||
Pushes your remote and prunes all current branchs that don't exist on the remote anymore.
|
||||
|
||||
> Warning! This means that all local work on that mirror can be lost. Generally I would recommend you don't work directly on the mirror repo. So the repo will looking like: Original > Mirrored Repo > Your Fork.
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
```
|
||||
git remote add {name_of_remote} {remote_url}
|
||||
git fetch {name_of_remote}
|
||||
git push origin 'refs/remotes/{name_of_remote}/:refs/heads/' --prune --tags
|
||||
```
|
||||
Reference in New Issue
Block a user