|
8 | 8 |
|
9 | 9 | * NOTE: When some text below is placed between `<` and `>`, that means the user should provide their own text in the command and the user should not include the `<` and `>`.
|
10 | 10 |
|
| 11 | +* To follow the guide, keep the two points in mind: |
| 12 | + * At each "**Execute the following commmand**" statement below, Type the command into your CLI and press enter. |
| 13 | + * Replace any part of the command within the `<` and `>` with your specific text. |
| 14 | + * The statement folling the "Sample command and output" statement is just an example of what the CLI might display on the line you execute the command and the following lines which display the reponse output of your command. |
| 15 | + |
11 | 16 |
|
12 | 17 | 1. Open CLI.
|
13 | 18 |
|
14 |
| -1. Make sure we are in correct folder (directory). We should be inside <class_name> folder (directory). `pwd` shows the current 'working directory': |
| 19 | +1. Make sure we are in correct folder (directory). We should be inside <class_name> folder (directory). `pwd` shows the current 'working directory'. **Execute the following commmand**: |
15 | 20 | ```
|
16 | 21 | pwd
|
17 | 22 | ```
|
|
26 | 31 | PS C:\Users\Bruce\Programming\class_name>
|
27 | 32 | ```
|
28 | 33 |
|
29 |
| -1. Verify we are in a directory that is a git repository: |
| 34 | +1. Verify we are in a directory that is a git repository. **Execute the following commmand**: |
30 | 35 | ```
|
31 | 36 | git status
|
32 | 37 | ```
|
|
46 | 51 | * lab-name: `getting-started`
|
47 | 52 | * My name is 'Bruce' so my branch name would be `bruce-lab00-getting-started`.
|
48 | 53 | * The command we will use (where `<branch-name>` is replaced by your branch name decided above):
|
49 |
| - * This command creates a new branch named `<branch-name>` from the current state of the `main` branch. |
| 54 | + * This command creates a new branch named `<branch-name>` from the current state of the `main` branch. **Execute the following commmand**: |
50 | 55 | ```
|
51 | 56 | git checkout -b <branch-name>
|
52 | 57 | ```
|
|
57 | 62 | PS C:\Users\Bruce\Programming\class_name>
|
58 | 63 | ```
|
59 | 64 |
|
60 |
| -1. We can verify current git branch and list local branches using `git branch`: |
| 65 | +1. We can verify current git branch and list local branches using `git branch`. **Execute the following commmand**: |
61 | 66 | ```
|
62 | 67 | git branch
|
63 | 68 | ```
|
|
70 | 75 | PS C:\Users\Bruce\Programming\class_name>
|
71 | 76 | ```
|
72 | 77 |
|
73 |
| -1. Verify contents of current directory: |
| 78 | +1. Verify contents of current directory. **Execute the following commmand**: |
74 | 79 | ```
|
75 | 80 | ls
|
76 | 81 | ```
|
|
89 | 94 |
|
90 | 95 | PS C:\Users\Bruce\Programming\class_name>
|
91 | 96 | ```
|
92 |
| -1. Change directory (folder) into the `code` directory: |
| 97 | +1. Change directory (folder) into the `code` directory. **Execute the following commmand**: |
93 | 98 | ```
|
94 | 99 | cd code
|
95 | 100 | ```
|
|
99 | 104 | PS C:\Users\Bruce\Programming\class_name\code>
|
100 | 105 | ```
|
101 | 106 |
|
102 |
| -1. Verify we are in `code` directory: |
| 107 | +1. Verify we are in `code` directory. **Execute the following commmand**: |
103 | 108 | ```
|
104 | 109 | pwd
|
105 | 110 | ```
|
|
114 | 119 | PS C:\Users\Bruce\Programming\class_name\code>
|
115 | 120 | ```
|
116 | 121 |
|
117 |
| -1. Create your directory inside the `code` directory. Use the lowercase version or your name: |
| 122 | +1. Create your directory inside the `code` directory. Use the lowercase version or your name. **Execute the following commmand**: |
118 | 123 | ```
|
119 | 124 | mkdir <studentdirectoryname>
|
120 | 125 | ```
|
|
132 | 137 | PS C:\Users\Bruce\Programming\class_name\code>
|
133 | 138 | ```
|
134 | 139 |
|
135 |
| -1. Change directory into your personal directory: |
| 140 | +1. Change directory into your personal directory. **Execute the following commmand**: |
136 | 141 | ```
|
137 | 142 | cd <studentdirectoryname>
|
138 | 143 | ```
|
|
147 | 152 | * This markdown file named `README.md` will hold your name, your directory name, and your GitHub username.
|
148 | 153 | * You can also add any other information or links to the file later if you choose.
|
149 | 154 | * The '#' below will make that line render as a heading in the markdown file.
|
150 |
| - * We will use something like this, where `Firstname Lastname` is replaced by your first and last name: |
| 155 | + * We will use something like this, where `Firstname Lastname` is replaced by your first and last name. **Execute the following commmand**: |
151 | 156 | ```
|
152 | 157 | echo "# Firstname Lastname" > README.md
|
153 | 158 | ```
|
|
171 | 176 | brucestull
|
172 | 177 | ```
|
173 | 178 |
|
174 |
| -1. Use `git status` to get the status of our branch: |
| 179 | +1. Use `git status` to get the status of our branch. **Execute the following commmand**: |
175 | 180 | ```
|
176 | 181 | git status
|
177 | 182 | ```
|
|
186 | 191 | nothing added to commit but untracked files present (use "git add" to track)
|
187 | 192 | PS C:\Users\Bruce\Programming\class_name\code\bruce>
|
188 | 193 | ```
|
| 194 | + * Sample command and output: |
| 195 | + ``` |
| 196 | + PS C:\Users\Bruce\Programming\class_HB2\code\bruce> git status |
| 197 | + On branch bruce-lab00-getting-started |
| 198 | + Changes not staged for commit: |
| 199 | + (use "git add <file>..." to update what will be committed) |
| 200 | + (use "git restore <file>..." to discard changes in working directory) |
| 201 | + modified: README.md |
| 202 | +
|
| 203 | + no changes added to commit (use "git add" and/or "git commit -a") |
| 204 | + PS C:\Users\Bruce\Programming\class_HB2\code\bruce> |
| 205 | + ``` |
189 | 206 |
|
190 |
| -1. Let's now add the files and directories we created to be tracked by git: |
| 207 | +1. Let's now add the files and directories we created to be tracked by git. **Execute the following commmand**: |
191 | 208 | ```
|
192 | 209 | git add -A
|
193 | 210 | ```
|
|
206 | 223 | git add <directorypath>
|
207 | 224 | ```
|
208 | 225 |
|
209 |
| -1. Let's use `git status` again to verify we are tracking the proper files: |
| 226 | +1. Let's use `git status` again to verify we are tracking the proper files. **Execute the following commmand**: |
210 | 227 | ```
|
211 | 228 | git status
|
212 | 229 | ```
|
|
224 | 241 | 1. We can now `commit` our changes to the branch `<studentname-labnumber-lab-name>` git history.
|
225 | 242 | * The `<commit message>` below is used to describe the changes this commit includes.
|
226 | 243 | * The `<commit message>` may be something like "Added directory for storing labs and included personal README.md"
|
227 |
| - * We will use the command `git commit -m "<commit message>"`: |
| 244 | + * We will use the command `git commit -m "<commit message>"`. **Execute the following commmand**: |
228 | 245 | ```
|
229 | 246 | git commit -m "<commit message>"
|
230 | 247 | ```
|
|
237 | 254 | PS C:\Users\Bruce\Programming\class_name\code\bruce>
|
238 | 255 | ```
|
239 | 256 |
|
240 |
| -1. Finally we can push our code to remote repository hosted on Github. This will allow the instructor and TAs to see the code changes and grade the labs: |
| 257 | +1. Finally we can push our code to remote repository hosted on Github. This will allow the instructor and TAs to see the code changes and grade the labs. **Execute the following commmand**: |
241 | 258 | ```
|
242 | 259 | git push origin <branch-name>
|
243 | 260 | ```
|
|
253 | 270 | remote: Resolving deltas: 100% (1/1), completed with 1 local object.
|
254 | 271 | remote:
|
255 | 272 | remote: Create a pull request for 'bruce-lab00-getting-started' on GitHub by visiting:
|
256 |
| - remote: https://github.com/PdxCodeGuild/class_062722/pull/new/bruce-lab00-getting-started |
| 273 | + remote: https://github.com/PdxCodeGuild/class_HB2/pull/new/bruce-lab00-getting-started |
257 | 274 | remote:
|
258 |
| - To https://github.com/PdxCodeGuild/class_062722.git |
| 275 | + To https://github.com/PdxCodeGuild/class_HB2.git |
259 | 276 | * [new branch] bruce-lab00-getting-started -> bruce-lab00-getting-started
|
260 | 277 | PS C:\Users\Bruce\Programming\class_name\code\bruce>
|
261 | 278 | ```
|
|
0 commit comments