any issues with file-copy Git Repo to another machine (and keep working from both)?

I want to copy all my git repos from my old machine to my new machine (both Ubuntu). I will keep using both machines... I am doing this primarily out of laziness (well: there are for some local branches at the moment, and convenient stashes at hand, also the fact that I have multiple remotes connected, ... transfer of all of that is a bit tedious...),

...but (with some pains) yes, I could just well freshly clone from the various upstream repositories...

Question: Is this harmful in some way?

(Of course the repo states should be binary identical, whether I copy files or go for git clone. But I could imagine, git puts some kind of unique (g)uuid into the .git folder upon first clone or so, to distinguish machines or such... but just a guess. I simply don't know the inner workings...)


update: My worries are primarily around uuids or similar, non-uniqueness of then two local git 'repos' ("clients") connecting towards one remote repo ("master/server").

If you know about this being ok or not-ok, I need actual sources for that knowledge (beyond „I believe“ or „It is“).

That being said, I think I found sort of a duplicate of my question on Superuser.


There is nothing wrong with repository move from one machine to another.

Git will update its internal configurations (if needed) on first run into the repo.

Maybe you can ask yourself why you need to move a repository like a normal folder, if your codebase needs things that are not included in a clean clone from remote then you're probably doing something wrong.

If you concerns are about project configuration files consider that probably on your new machine you'll have to recreate databases or change path or similar so there's no point in keeping old configurations for your project, start fresh and go clean.


No harm. I recommend using rsync, but tar or cp will do just as well.