What is the best way to back up an entire git repository on external disk?

So I want to be able to back up a git repository that may have several branches onto an external hard drive and then be at a later time be able to copy it back onto my local machine and work with it as usual? I have tried simply copying the working directory folder containing the .git directory and it worked. However, I was wondering if this was the best way or if it had pitfalls later.

19
задан racl101 7 December 2010 в 02:21
поделиться