Skip to content

Commit 6a585e0

Browse files
committed
separate bash command from output in workflow lession
1 parent 3c57552 commit 6a585e0

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

lessons/git/git-workflow.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ Change to it and view its contents:
115115
```
116116
cd ivy-collaboration
117117
ls
118+
```
119+
```
118120
CONTRIBUTORS.md LICENSE README.md
119121
```
120122

@@ -126,6 +128,8 @@ The next step in the workflow isn't isn't necessary at this point, but it's some
126128
Use the `git status` subcommand to check on the current state of the repository:
127129
```
128130
git status
131+
```
132+
```
129133
On branch main
130134
Your branch is up to date with 'origin/main'.
131135
@@ -176,6 +180,8 @@ is still the default `main` branch,
176180
as we can see with `git branch`:
177181
```
178182
git branch
183+
```
184+
```
179185
* main
180186
mdpiper/update-contributors
181187
```
@@ -202,6 +208,8 @@ has a file, `CONTRIBUTORS.md`.
202208
View the files in the repository:
203209
```
204210
ls
211+
```
212+
```
205213
CONTRIBUTORS.md LICENSE README.md
206214
```
207215
With your favorite text editor,
@@ -215,6 +223,8 @@ Now that we've changed a file that's under version control,
215223
view the changes with `git diff`:
216224
```
217225
git diff CONTRIBUTORS.md
226+
```
227+
```diff
218228
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
219229
index 23d368e..41f5c9b 100644
220230
--- a/CONTRIBUTORS.md
@@ -230,6 +240,8 @@ index 23d368e..41f5c9b 100644
230240
Then check on the state of the repository with `git status`:
231241
```
232242
git status
243+
```
244+
```
233245
On branch mdpiper/update-contributors
234246
Your branch is up-to-date with 'origin/main'.
235247
Changes not staged for commit:
@@ -256,6 +268,8 @@ git add CONTRIBUTORS.md
256268
Check the result of this command with `git status`:
257269
```
258270
git status
271+
```
272+
```
259273
On branch mdpiper/update-contributors
260274
Your branch is up-to-date with 'origin/main'.
261275
Changes to be committed:
@@ -279,6 +293,8 @@ To finalize the changes to the repository,
279293
we *commit* them with `git commit`:
280294
```
281295
git commit -m "Add member to contributor list"
296+
```
297+
```
282298
[mdpiper/update-contributors 4c9565b] Add member to contributor list
283299
1 file changed, 1 insertion(+), 1 deletion(-)
284300
```
@@ -291,6 +307,8 @@ It's also a convention to use imperative case.
291307
Check the result with `git status`:
292308
```
293309
git status
310+
```
311+
```
294312
On branch mdpiper/update-contributors
295313
nothing to commit, working directory clean
296314
```
@@ -307,6 +325,8 @@ Our local repository now differs from its remotes.
307325
View the history of revisions to the repository with `git log`:
308326
```
309327
git log
328+
```
329+
```
310330
commit 4c9565be25ca5c91d66867631112c68301250991
311331
Author: Mark Piper <[email protected]>
312332
Date: Mon Jun 7 15:19:32 2021 -0600
@@ -337,6 +357,8 @@ you must have write access on the remote.
337357
Therefore, push the changes with:
338358
```
339359
git push origin mdpiper/update-contributors
360+
```
361+
```
340362
Counting objects: 3, done.
341363
Delta compression using up to 16 threads.
342364
Compressing objects: 100% (3/3), done.
@@ -410,6 +432,8 @@ First,
410432
use the `git remote` subcommand to view what remotes are being tracked by your local repository:
411433
```
412434
git remote -v
435+
```
436+
```
413437
origin [email protected]:mdpiper/ivy-collaboration.git (fetch)
414438
origin [email protected]:mdpiper/ivy-collaboration.git (push)
415439
```
@@ -424,6 +448,8 @@ git remote add upstream [email protected]:csdms/ivy-collaboration.git
424448
Check the result with another call to `git remote`:
425449
```
426450
git remote -v
451+
```
452+
```
427453
origin [email protected]:mdpiper/ivy-collaboration.git (fetch)
428454
origin [email protected]:mdpiper/ivy-collaboration.git (push)
429455
upstream [email protected]:csdms/ivy-collaboration.git (fetch)
@@ -434,6 +460,8 @@ Next, switch back to the *main* branch in your local repository.
434460
This is the branch into which the pull request was merged.
435461
```
436462
git checkout main
463+
```
464+
```
437465
Switched to branch 'main'
438466
Your branch is up-to-date with 'origin/main'.
439467
```

0 commit comments

Comments
 (0)