Skip to content

Commit

Permalink
Merge pull request #14 from OperationSpark/edit-instructions
Browse files Browse the repository at this point in the history
Edit instructions to work for simulated terminal
  • Loading branch information
taylorshephard authored Sep 9, 2024
2 parents a4254cb + 974334c commit c792de5
Show file tree
Hide file tree
Showing 56 changed files with 390 additions and 413 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ from github.

Manually modifying the files in the `gh-pages` branch is probably the
wrong thing to do. Modify the appropriate template or css file on the
master branch, then run `rake publish`.
main branch, then run `rake publish`.

## Lab Format Directives

Expand Down Expand Up @@ -146,7 +146,7 @@ Example:
Output:
git commit
Waiting for Emacs...
[master 569aa96] Using ARGV
[main 569aa96] Using ARGV
1 files changed, 1 insertions(+), 1 deletions(-)
EOF

Expand Down Expand Up @@ -185,7 +185,7 @@ Execute sction of a lab.
Example:

Execute:
git checkout master
git checkout main
=checkout
git status
=status
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ end

desc "Publish the Git Immersion web site."
task :publish => [:not_dirty, :build, :labs] do
sh 'git checkout master'
sh 'git checkout main'
head = `git log --pretty="%h" -n1`.strip
sh 'git checkout gh-pages'
cp FileList['git_tutorial/html/*'], '.'
sh 'git add .'
sh "git commit -m 'Updated docs to #{head}'"
sh 'git push'
sh 'git checkout master'
sh 'git checkout main'
end

directory "dist"
Expand Down
6 changes: 3 additions & 3 deletions docs/lab_01.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down
6 changes: 3 additions & 3 deletions docs/lab_02.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down
8 changes: 4 additions & 4 deletions docs/lab_03.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down Expand Up @@ -123,7 +123,7 @@ <h3><b>Execute:</b></h3>
<h3><b>Output:</b></h3>
<pre class="sample">$ git add hello.js
$ git commit -m "First Commit"
[master (root-commit) 284070d] First Commit
[main (root-commit) 284070d] First Commit
1 file changed, 1 insertion(+)
create mode 100644 hello.js
</pre>
Expand Down
8 changes: 4 additions & 4 deletions docs/lab_04.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down Expand Up @@ -105,7 +105,7 @@ <h3><b>Execute:</b></h3>
<p>You should see</p>
<h3><b>Output:</b></h3>
<pre class="sample">$ git status
On branch master
On branch main
nothing to commit, working tree clean
</pre>
<p>The status command reports that there is nothing to commit. This means that the repository has all the current state of the working directory. There are no outstanding changes to record.</p>
Expand Down
8 changes: 4 additions & 4 deletions docs/lab_05.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down Expand Up @@ -110,7 +110,7 @@ <h3><b>Execute:</b></h3>
<p>You should see &#8230;</p>
<h3><b>Output:</b></h3>
<pre class="sample">$ git status
On branch master
On branch main
Changes not staged for commit:
(use "git add &lt;file&gt;..." to update what will be committed)
(use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
Expand Down
8 changes: 4 additions & 4 deletions docs/lab_06.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down Expand Up @@ -107,7 +107,7 @@ <h3><b>Execute:</b></h3>
<h3><b>Output:</b></h3>
<pre class="sample">$ git add hello.js
$ git status
On branch master
On branch main
Changes to be committed:
(use "git reset HEAD &lt;file&gt;..." to unstage)

Expand Down
6 changes: 3 additions & 3 deletions docs/lab_07.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down
44 changes: 7 additions & 37 deletions docs/lab_08.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down Expand Up @@ -100,46 +100,16 @@ <h2>Goals</h2>
</ul>
<h2>Commit the change</h2>
<p>Ok, enough about staging. Let&#8217;s commit what we have staged to the repository.</p>
<p>When you used <code>git commit</code> previously to commit the initial version of the <code>hello.js</code> file to the repository, you included the <code>-m</code> flag that gave a comment on the command line. The commit command will allow you to interactively edit a comment for the commit. Let&#8217;s try that now.</p>
<p>If you omit the <code>-m</code> flag from the command line, git will pop you into the editor of your choice. The editor is chosen from the following list (in priority order):</p>
<ul>
<li>GIT_EDITOR environment variable</li>
<li>core.editor configuration setting</li>
<li><span class="caps">VISUAL</span> environment variable</li>
<li><span class="caps">EDITOR</span> environment variable</li>
</ul>
<p>I have the <span class="caps">EDITOR</span> variable set to <code>vim</code>.</p>
<p>Committing is the action of saving the changes to the repository. It is like taking a snapshot of the changes. You can always go back to this snapshot later.</p>
<p>So commit now and check the status.</p>
<h3><b>Execute:</b></h3>
<pre class="instructions">git commit</pre>
<p>You should see the following in your editor:</p>
<h3><b>Output:</b></h3>
<pre class="sample">|
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
# (use "git reset HEAD &lt;file&gt;..." to unstage)
#
# modified: hello.js
#
</pre>
<p>On the first line, enter the comment: &#8220;Using process.argv&#8221;. Save the file and exit the editor. You should see &#8230;</p>
<h3><b>Output:</b></h3>
<pre class="sample">git commit
Waiting for Vim...
[master 569aa96] Using process.argv
1 files changed, 1 insertions(+), 1 deletions(-)
</pre>
<p>The &#8220;Waiting for Vim&#8230;&#8221; line comes from the <code>vim</code> program which sends the file to a running vim program and waits for the file to be closed. The rest of the output is the standard commit messages.</p>
<h2>Check the status</h2>
<p>Finally let&#8217;s check the status again.</p>
<h3><b>Execute:</b></h3>
<pre class="instructions">git commit -m "Using process.argv</pre>
<pre class="instructions">git status</pre>
</pre>
<p>You should see &#8230;</p>
<h3><b>Output:</b></h3>
<pre class="sample">$ git status
On branch master
On branch main
nothing to commit, working tree clean
</pre>
<p>The working directory is clean and ready for you to continue.</p>
Expand Down
14 changes: 7 additions & 7 deletions docs/lab_09.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@
<li id="lab_21_link"><a href="lab_21.html">More Structure</a></li>
<li id="lab_22_link"><a href="lab_22.html">Creating a Branch</a></li>
<li id="lab_23_link"><a href="lab_23.html">Navigating Branches</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Master</a></li>
<li id="lab_24_link"><a href="lab_24.html">Changes in Main</a></li>
<li id="lab_25_link"><a href="lab_25.html">Viewing Diverging Branches</a></li>
<li id="lab_26_link"><a href="lab_26.html">Merging</a></li>
<li id="lab_27_link"><a href="lab_27.html">Creating a Conflict</a></li>
<li id="lab_28_link"><a href="lab_28.html">Resolving Conflicts</a></li>
<li id="lab_29_link"><a href="lab_29.html">Rebasing VS Merging</a></li>
<li id="lab_30_link"><a href="lab_30.html">Resetting the Greet Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Master Branch</a></li>
<li id="lab_31_link"><a href="lab_31.html">Resetting the Main Branch</a></li>
<li id="lab_32_link"><a href="lab_32.html">Rebasing</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Master</a></li>
<li id="lab_33_link"><a href="lab_33.html">Merging Back to Main</a></li>
<li id="lab_34_link"><a href="lab_34.html">Multiple Repositories</a></li>
<li id="lab_35_link"><a href="lab_35.html">Cloning Repositories</a></li>
<li id="lab_36_link"><a href="lab_36.html">Review the Cloned Repository</a></li>
Expand Down Expand Up @@ -126,7 +126,7 @@ <h3><b>Execute:</b></h3>
<p>You should see &#8230;</p>
<h3><b>Output:</b></h3>
<pre class="sample">$ git status
On branch master
On branch main
Changes to be committed:
(use "git reset HEAD &lt;file&gt;..." to unstage)

Expand All @@ -149,10 +149,10 @@ <h3><b>Execute:</b></h3>
<p>You should see &#8230;</p>
<h3><b>Output:</b></h3>
<pre class="sample">$ git commit -m "Added a default value"
[master 20a6c79] Added a default value
[main 20a6c79] Added a default value
1 file changed, 3 insertions(+), 1 deletion(-)
$ git status
On branch master
On branch main
Changes not staged for commit:
(use "git add &lt;file&gt;..." to update what will be committed)
(use "git checkout -- &lt;file&gt;..." to discard changes in working directory)
Expand All @@ -172,7 +172,7 @@ <h3><b>Execute:</b></h3>
<p>You should see &#8230;</p>
<h3><b>Output:</b></h3>
<pre class="sample">$ git status
On branch master
On branch main
Changes to be committed:
(use "git reset HEAD &lt;file&gt;..." to unstage)

Expand Down
Loading

0 comments on commit c792de5

Please sign in to comment.