You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 04-git-started.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Use `mkdir` command to create the folder, change into the new folder, and then u
13
13
Let's presume the new project will be in the `Duck-Rogers` folder.
14
14
15
15
Use the `pwd` command to verify the folder:
16
-

17
17
18
18
You see that the Windows `\` have been reversed to `/` and the `:` removed.
19
19
@@ -23,7 +23,7 @@ cd Duck-Rogers
23
23
git init .
24
24
```
25
25
26
-

27
27
28
28
The command prompt will now show either `(master)` or `(main)` - if it is `master`, we will show you later how to (a) change it to `main` for the current project and (b) to make `main` the default.
29
29
@@ -36,28 +36,28 @@ git init Duck-Rogers
36
36
cd Duck-Rogers
37
37
```
38
38
39
-

40
40
41
-

42
42
43
43
### Option 3: Initialise project with existing files
44
44
45
45
The best part of this is that you are basically able to use the previous options, except the folder already exists.
46
46
47
47
For example, if `Duck-Rogers` already exist and has files, then, if we are at the parent folder for Duck-Rogers we can use the `git init Duck-Rogers` command.
48
48
49
-

50
50
51
51
If you are in the `Duck-Rogers` folder and there are files in the folder then using the `git init .` command will do the same thing.
52
52
53
-

54
54
55
55
56
56
## Verify Repository was Created
57
57
58
58
To check it is created we use the `ls -la` command:
59
59
60
-

61
61
62
62
Notice the last line. The `d` at the start tells you it is a folder (directory), and its name is `.git`. It is a hidden folder.
Now when you enter `git commit` the Notepad editor will open. The command line will tell you it is waiting for the editor to close a file (`COMMIT_MESSAGE`).
93
93
94
-

95
95
96
96
When Notepad is opened, it will show a set of comments that tell you details about the added files as comments.
97
97
98
-

99
99
100
100
Now editing the commit message and adding the details that may be more than just a one liner is easy.
0 commit comments