Merge branch 'main' into repo-sync
This commit is contained in:
@@ -87,13 +87,13 @@ If you want to mirror a repository in another location, including getting update
|
||||
$ cd <em>repository-to-mirror</em>
|
||||
$ git remote set-url --push origin https://{% data variables.command_line.codeblock %}/<em>exampleuser</em>/<em>mirrored</em>
|
||||
```
|
||||
As with a bare clone, a mirrored clone includes all remote branches and tags, but all local references will be overwritten each time you fetch, so it will always be the same as the original repository. Setting the URL for pushes simplifies pushing to your mirror.
|
||||
|
||||
As with a bare clone, a mirrored clone includes all remote branches and tags, but all local references will be overwritten each time you fetch, so it will always be the same as the original repository. Setting the URL for pushes simplifies pushing to your mirror. To update your mirror, fetch updates and push.
|
||||
|
||||
```shell
|
||||
$ git fetch -p origin
|
||||
$ git push --mirror
|
||||
```
|
||||
4. To update your mirror, fetch updates and push.
|
||||
```shell
|
||||
$ git fetch -p origin
|
||||
$ git push --mirror
|
||||
```
|
||||
{% ifversion fpt or ghec %}
|
||||
## Further reading
|
||||
|
||||
|
||||
Reference in New Issue
Block a user