Git – Are there any concurrency issues in backing up git


I've seen lots of people say you can backup git repositories by just copying them, but what happens if you are copying the repository at the same time that someone is pushing some changes up to it?

Best Solution

Basically what will happen is that you will get the complete repo at the time of copy. If there is a partial transaction hanging around from a push at time of copy it will be cleaned up as a failed transaction, just like you had lost a network connection while pushing to a remote repository.