I've got a git repo set up on my iMac and I'd like to download it to my MacBook so I can work on it there. How do I do that?
4 Answers
You can git clone
it like any git repository. If you have git-daemon setup, it's:
git clone git://your-imac/repoName
If not, you can use ssh:
git clone username@your-imac:/path/to/your/repo
-
1The second part of this will be getting your work from the macbook back to the imac. That would be
git remote add macbook username@macbook:/path/to/repo
and thenfetch
,merge
etc.– ndimJan 7, 2011 at 0:30
If it's accessible just use:
git clone
Otherwise just copy the .git folder by hand. That should be sufficient.
Git is self-contained - simply copying the contents of the repository would work fine.
If you have SSH access to the machine it's currently on, you could also simply use git clone
.
-
I would clone before copying, because issues can arise if the source git version is newer than the destination git version.– fuzzyTewJan 7, 2011 at 0:09
-
When I tried copying the files over git was complaining about bad file signatures and so on, so it doesn't appear to be a reliable solution. Apr 16, 2014 at 17:12
In Mac machine: Goto required folder using terminal.
Open terminal
type cd and drag and drop folder on terminal.
you are in same folder where you want to download
use command:
cd <folder path of local machine> git clone <url> eg: Mac-mini: macuser$ cd /Users/macuser/Desktop/GIT_PROJ Mac-mini:GIT_PROJ macuser$ git clone https://abcd@bitbucket.org/abcd/sample.git
it will download the Repository to you local machine.