Can someone please give me the details on
git clone or git clone --mirror
Thanks. I am trying to make backups of my github repos and I am using it in a script.
I don't know what the difference is and I need someone to help me with the backups.
Can someone please give me the details on
git clone or git clone --mirror
Thanks. I am trying to make backups of my github repos and I am using it in a script.
I don't know what the difference is and I need someone to help me with the backups.
--mirror
Set up a mirror of the source repository. This implies --bare. Compared to --bare, --mirror not only maps local branches of the source to local branches of the target, it maps all refs (including remote-tracking branches, notes etc.) and sets up a refspec configuration such that all these refs are overwritten by a git remote update in the target repository.
You'll get a bare repository, with all branches. This is what you want for a backup.