https://github.com/ntns/gh-mirror
Tool to mirror Github repositories locally
https://github.com/ntns/gh-mirror
backups github mirror
Last synced: 16 days ago
JSON representation
Tool to mirror Github repositories locally
- Host: GitHub
- URL: https://github.com/ntns/gh-mirror
- Owner: ntns
- License: mit
- Created: 2022-10-02T12:30:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-21T17:42:32.000Z (over 2 years ago)
- Last Synced: 2024-06-20T01:52:09.441Z (over 1 year ago)
- Topics: backups, github, mirror
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gh-mirror
Tool to mirror Github repositories locally
# use cases
Keeping a local backup of Github repositories
# installation
`go install github.com/ntns/gh-mirror`
# usage
```
$ gh-mirror -init # init gh-mirror directory and config
$ gh-mirror -add username/repo # add repo to gh-mirror
$ gh-mirror -list # list repos added to gh-mirror
$ gh-mirror # mirror and update repos
```
You can use gh-mirror from any directory. Repos will always be saved at ~/gh-mirror/username/repo.
# how it works
New repositories are cloned using `git clone --mirror`
Existing repositories are kept up to date using `git remote update`
That's it!