23

I am trying to integrate Facebook with my app. I read this on developers.facebook.com:

  1. Install XCode
  2. Install Git
  3. Clone the GitHub repository with this command:
    git clone git://github.com/facebook/facebook-ios-sdk.git

I have installed XCode and Git.

What does it mean to clone a GitHub repository and how can I do that?

Aryan Beezadhur
  • 4,503
  • 4
  • 21
  • 42
Piscean
  • 3,069
  • 12
  • 47
  • 96

6 Answers6

27

To clone a repository means to duplicate and download everything in the repository.

You are on a Mac, so launch Terminal, create a folder and type this command:

git clone git://github.com/facebook/facebook-ios-sdk.git

It will duplicate and download the entire repository.

Aryan Beezadhur
  • 4,503
  • 4
  • 21
  • 42
PierreL
  • 460
  • 4
  • 7
6

Cloning a git repository means that you create a local copy of the code provided by developer. You can simply do it with a command line:

git clone git://github.com/facebook/facebook-ios-sdk.git .

and you'll have the code in the facebook-ios-sdk directory.

Stéphane Péchard
  • 2,013
  • 3
  • 22
  • 35
4

Cloning a git repository is basically downloading a code base to your own machine, so you can use, edit... this code base.

For doing it is as easy as creating a folder where you want to store this code, and then from the terminal execute from this folder:

git clone git://github.com/facebook/facebook-ios-sdk.git .
Fernando Diaz Garrido
  • 3,995
  • 19
  • 22
  • So how does Terminal know where you want this repository to go to? I believe your instruction is missing something crucial. There has to be a step between creating a folder and cloning the repository. – iamjustaprogrammer May 04 '14 at 19:32
  • You need to get Terminal into the right directory before hand. – Leon Sep 17 '15 at 21:55
3

Cloning a repository means that you're downloading a copy of the source code from source control. To use the iOS SDK you have to download the code from GitHub (ie- clone the iOS SDK repository).

Type

git clone git://github.com/facebook/facebook-ios-sdk.git [path to where you want to save sdk]

from a shell / command prompt.

squillman
  • 13,363
  • 3
  • 41
  • 60
1

Cloning basically means you want to get a local copy of the code present in the repository. After cloning you can then do whatever changes you like in the code and then you can pull the changes back to the repository

Mr. Suryaa Jha
  • 1,516
  • 16
  • 10
0

clone the repo

Cloning = means copying

Repo = is short form of Repository which is the complete files of the project

Create a folder, Open terminal and take the path into that folder where you want to save the repo, and then run this command

git clone git://github.com/facebook/facebook-ios-sdk.git

This command will download all the files to that folder

Welcome in Advance

Ullas Pujary
  • 349
  • 4
  • 14