Cloning git repo with all refs
I’m trying to get all refs from an external repository when cloning. I exported them all before, by doing
push --mirror, so the external repository should have them, as far as I know.
How can I force all refs to be pulled?
- Mirroring git repository with submodules
- How to update a git clone --mirror?
- Mirror SVN Repository
- Using git to make daily snapshots of a mirror
- Gitlab returning remote: You do not have permissions to do this. while performing scripted git push
- Syncing one remote git repo with other
One Solution collect form web for “Cloning git repo with all refs”
git fetch --tags
should be enough to get all branches, and all tags from your remote mirror bare repo.
Most of the tags are fetched automatically as branch heads are downloaded, but tags that do not point at objects reachable from the branch heads that are being tracked will not be fetched by this mechanism.
This flag lets all tags and their associated objects be downloaded.