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
| home folder.<br><br>In Windows terms, this is the same as:<br><br> `C:\Users\UserName\Source\Repos`<br> |
48
+
|| This is the user account, followed by the computer name and separated by an `@`<br><br>Literally: *User **at** Computer*<br> |
49
+
|| Tells us that we are running in MinGW 64 bit<br> |
50
+
|| Shows we are in the `~/Source/Repos` folder, where `~` is the user's (your) home folder.<br><br>In Windows terms, this is the same as:<br><br> `C:\Users\UserName\Source\Repos`<br> |
51
51
52
52
## Setting up Microsoft Terminal to use Git Bash as a CLI
53
53
@@ -57,52 +57,52 @@ Click on the `v` (or press `CTRL`+`,`) on the tab bar.
57
57
58
58
Click *Settings*...
59
59
60
-

61
61
62
62
Click on *Add a new profile*...
63
63
64
-

65
65
66
66
Click *New Empty Profile*...
67
67
68
-

69
69
70
70
Click on the `v` next to the "*Profile x*"...
71
71
72
-

73
73
74
74
And give the profile a name...
75
75
76
-

77
77
78
78
Next find the *Command Line* entry and click on the `v`
79
79
80
-

81
81
82
82
Then click the *Browse* button...
83
83
84
-

85
85
86
86
At home, if you have installed using Git-SCM installer then the default location for Git is: `c:\program files\git`. If you have Laragon installed using the default installation location, then you should find Git in the `C:\Laragon\bin\git` folder.
87
87
88
88
> At TAFE, we have a different location, `c:\ProgramData\git` or even `C:\ProgramData\Laragon\bin\git`.
89
89
90
90
Use the browse to locate the folder and find either the `git.exe` or the `bash.exe` file in the `bin` folder.
91
91
92
-

93
93
94
94
Click on the Starting Directory `v` and then untick the "*Use parent process directory*"...
95
95
96
-

97
97
This should then show `%USERPROFILE%` in a text field and `Browse` button underneath...
98
98
99
-

100
100
101
101
No matter what is shown, clear the content and enter the following in its place...
102
102
103
103
`%USERPROFILE%\Source\Repos`
104
104
105
-

106
106
107
107
Click `SAVE` to save the changes
108
108
@@ -115,21 +115,21 @@ The steps below are optional, and you may vary to your own "taste".
115
115
116
116
Click the *Appearance* item.
117
117
118
-

119
119
120
120
You may change the base colour scheme, the font face and more.
121
121
122
122
Here are the settings Adrian has for this terminal prompt:
123
123
124
-

125
125
126
126
Click Save then you can click the `X` next to settings to close the dialog.
127
-

128
128
129
129
Finally you are able to open the new terminal by clicking on the `v` and selecting your custom terminal or using the short-cut it shows on the right next to your custom terminal.
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
-
![[pasted-image-20240216113101.png]]
16
+
![[pasted-image-20240216113101.png)
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
-
![[pasted-image-20240216113320.png]]
26
+
![[pasted-image-20240216113320.png)
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
-
![[pasted-image-20240216113649.png]]
39
+
![[pasted-image-20240216113649.png)
40
40
41
-
![[pasted-image-20240216113804.png]]
41
+
![[pasted-image-20240216113804.png)
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
-
![[pasted-image-20240216114404.png]]
49
+
![[pasted-image-20240216114404.png)
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
-
![[pasted-image-20240216114456.png]]
53
+
![[pasted-image-20240216114456.png)
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
-
![[pasted-image-20240216113831.png]]
60
+
![[pasted-image-20240216113831.png)
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
-
![[pasted-image-20240223102507.png]]
94
+
![[pasted-image-20240223102507.png)
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
-
![[pasted-image-20240223102034.png]]
98
+
![[pasted-image-20240223102034.png)
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