Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move local git repo from one hdd to another hdd?

I'm currently setting up git on one of my local hdds, but will eventually be moving all my git repos on to another hdd (I want to split my work files from my own files, but I do not have the drives yet). Would it be possible to move those local work git repos to the new hdds by just dragging and dropping?

I have a Mac OSX Lion, and am setting up local repos for multiple macs that use my home NAS server as the mothership. I am still a beginner at this git stuff, so any tips are much appreciated. Thanks!

like image 865
Jay Avatar asked May 27 '12 12:05

Jay


1 Answers

Yes, you can simply copy all the files to your other computer. But make sure to also copy the "hidden" files, meaning the files that names are starting with a dot.

Here's a link to a Page describing how to make the hidden files appear in the finder.

Each and every git-repository has a hidden folder called .git in its top-most directory. This folder contains all the history, revisions and so on. Inside that folder you can also find a file called config, that you could modify to your wishes after moving the repository.

So basically this .git folder is everything that makes the difference between your bare project files and a git-enabled repository.

like image 199
devsnd Avatar answered Oct 08 '22 08:10

devsnd