I like a way to copy repo via clone --mirror
as it copies all branches. However, it results in config that still AFAIK not ready for pull/push etc.:
[core]
bare = true
[remote "origin"]
fetch = +refs/*:refs/*
mirror = true
Using --mirror
posted e.g. here Move git repo with git clone --mirror and git push --mirror, I've tried to add
git remote set-url origin my-url (two tries: where target was - current, and new empty folder)
git push --mirror
But still same config
, however in answers I have not found mentioning of similar issue.
Maybe it is so easy to fix it was omitted? How to make target to track repo the source is tracking? Just remove mirror = true
and edit fetch = +refs/heads/*:refs/remotes/origin/*
by hand? TIA
clone --mirror
. Now I realized there is something important to be done after cloning.git clone <repo url>
, I get all branches, so I'm not sure yet what you're trying to solve that a regular clone does not do.