Note that git clone
now has a new --dissociate
option that does this. It was added in Git 2.3: https://github.com/blog/1957-git-2-3-has-been-released
The option simply calls git repack -a -d
and deletes .git/objects/info/alternates
. So yes, it is safe. (Source: https://github.com/gitster/git/commit/d35c8027937546e6b22a2f28123f731c84e3b380)