Skip to content

Commit 129bb05

Browse files
authored
Added examples how to change the directory
It's very useful to have example for each OS how to change the directory in Git (especially for Windows because the syntax is different from the default syntax — C:/Users/your_repository). Second try to contribute to this project.
1 parent 6c645d2 commit 129bb05

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

book/02-git-basics/sections/getting-a-repository.asc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,25 @@ The second clones an existing Git repository from another server.
77

88
==== Initializing a Repository in an Existing Directory
99

10-
If you're starting to track an existing project in Git, you need to go to the project's directory and type:
10+
If you're starting to track an existing project in Git, you need to go to the project's directory. If you've never done this, it looks a little different depending on which system you're running:
11+
12+
for Linux:
13+
[source,console]
14+
----
15+
$ cd /home/user/your_repository
16+
----
17+
for Mac:
18+
[source,console]
19+
----
20+
$ cd /Users/user/your_repository
21+
----
22+
for Windows:
23+
[source,console]
24+
----
25+
$ cd /c/user/your_repository
26+
----
27+
28+
and type:
1129

1230
[source,console]
1331
----

0 commit comments

Comments
 (0)