Moshe
Moshe

Reputation: 58097

How do I transfer a git repo to my other computer?

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?

Upvotes: 3

Views: 6647

Answers (4)

Anil Gupta
Anil Gupta

Reputation: 1225

In Mac machine: Goto required folder using terminal.

  1. Open terminal

  2. type cd and drag and drop folder on terminal.

  3. you are in same folder where you want to download

  4. 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
    
  5. it will download the Repository to you local machine.

Upvotes: 0

Amber
Amber

Reputation: 527378

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.

Upvotes: 0

Fake Code Monkey Rashid
Fake Code Monkey Rashid

Reputation: 14577

If it's accessible just use:

git clone

Otherwise just copy the .git folder by hand. That should be sufficient.

Upvotes: 0

Michael Mrozek
Michael Mrozek

Reputation: 175705

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

Upvotes: 8

Related Questions