22
1
I’m pretty new to using git and was wondering if it’s ok to copy a Git repository with common UNIX commands (like cp
or tar
/untag
), rather than through git clone
.
I’m in the situation where I have a production environment (python virtual) that some code checked out in git in it. I’m wondering if it's a bad idea from a git perspective to copy down the whole environment using a tar
or something. This approach would be convenient for making a quick copy of a codebase/environment.
My concern is that maybe git clone associates some unique id with the working copy that could cause conflicts if two working copies exist where one was filesystem-copied from the other.
Wow I was in this situation because I had some files under source control and some not, and I had file permissions I needed to preserve. I'm glad you asked this question. – Joe C – 2016-06-02T21:58:31.163