|
1 | 1 | [[_getting_a_repo]]
|
2 | 2 | === Getting a Git Repository
|
3 | 3 |
|
4 |
| -You can get a Git project using two main approaches. |
5 |
| -The first takes an existing project or directory and imports it into Git. |
6 |
| -The second clones an existing Git repository from another server. |
| 4 | +You typically obtain a Git repository in one of two ways: |
| 5 | + |
| 6 | +1. You can take a local directory that is currently not under version control, and turn it into a Git repository, or |
| 7 | +2. You can _clone_ an existing Git repository from elsewhere. |
| 8 | + |
| 9 | +In either case, you end up with a Git repository on your local machine, ready for work. |
7 | 10 |
|
8 | 11 | ==== Initializing a Repository in an Existing Directory
|
9 | 12 |
|
10 |
| -If you have a project that is currently not under version control and you want to start controlling it with Git, you first need to go to that project's directory. If you've never done this, it looks a little different depending on which system you're running: |
| 13 | +If you have a project directory that is currently not under version control and you want to start controlling it with Git, you first need to go to that project's directory. |
| 14 | +If you've never done this, it looks a little different depending on which system you're running: |
11 | 15 |
|
12 | 16 | for Linux:
|
13 | 17 | [source,console]
|
@@ -67,7 +71,8 @@ $ git clone https://github.com/libgit2/libgit2
|
67 | 71 | ----
|
68 | 72 |
|
69 | 73 | That creates a directory named `libgit2`, initializes a `.git` directory inside it, pulls down all the data for that repository, and checks out a working copy of the latest version.
|
70 |
| -If you go into the new `libgit2` directory, you'll see the project files in there, ready to be worked on or used. |
| 74 | +If you go into the new `libgit2` directory that was just created, you'll see the project files in there, ready to be worked on or used. |
| 75 | + |
71 | 76 | If you want to clone the repository into a directory named something other than `libgit2`, you can specify that as the next command-line option:
|
72 | 77 |
|
73 | 78 | [source,console]
|
|
0 commit comments