Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions source/ch-merge-conflicts/sec-extra-practice.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<task>
<statement>
<p>
Use the following command to get this feature branch from the upstream into your local repo: <c>git fetch upstream merge-conflict-practice</c>
Ensure that you are in the directory for your GitKit FarmData2 repository. Then use the following command to get this feature branch from the upstream into your local repo: <c>git fetch upstream merge-conflict-practice</c>
</p>
</statement>
</task>
Expand Down Expand Up @@ -252,7 +252,7 @@
</p>
</statement>
<choices randomize="no">
<choice correct="yes">
<choice>
<statement>
<p>
1
Expand All @@ -264,7 +264,7 @@
</p>
</feedback>
</choice>
<choice>
<choice correct="yes">
<statement>
<p>
2
Expand Down Expand Up @@ -344,7 +344,7 @@
</blocks>
</exercise>

<exercise xml:id="ex-extra-practice-do-it" label="ex-extra-practice-merging-do-it">
<exercise xml:id="ex-extra-practice-pr-link" label="ex-extra-practice-pr-link">
<statement>
<p>
Carry out the steps you identified above in <xref ref="ex-extra-practice-resolving-conflicts" /> and give a link to your pull request.
Expand All @@ -355,8 +355,7 @@
</statement>
<setup>
<var>
<condition string='^https://github\.com/DickinsonCollege/FarmData2).)/pulls[0-9]+$'>

<condition string="^https://github\.com/(?!(FarmData2/FarmData2|DickinsonCollege/FarmData2)).*/pulls/[0-9]+$">
<feedback>
<p>
Thank you.
Expand All @@ -366,7 +365,7 @@
<condition string=".*">
<feedback>
<p>
Be sure that your URL is from your pull request to the upstream repository.
Be sure that your URL is from your pull request to the upstream repository. It should have the format <c>https://github.com/upstreamLocation/upstreamReop/pulls/xx</c>, where <c>xx</c> is a number.
</p>
</feedback>
</condition>
Expand Down
89 changes: 52 additions & 37 deletions source/ch-merge-conflicts/sec-git-command-summary.ptx
Original file line number Diff line number Diff line change
Expand Up @@ -15,46 +15,61 @@
<exercises>
<title />
<exercise xml:id="ex-git-commands-summary-merging" label="ex-git-commands-summary-merging">
<statement>
<introduction>
<p>
Match the tasks on the right with the appropriate git command listed on the left. The &lt;...&gt; notation indicates parameters that are needed to customize each use.
</p>
</statement>
<matches>
<match>
<premise><c>git switch &lt;branch&gt; </c></premise>
<response>Change the active branch.</response>
</match>
<match>
<premise><c>git pull upstream main </c></premise>
<response>Synchronize the local <c>main</c> branch with the upstream <c>main</c> branch.</response>
</match>
<match>
<premise><c>git push origin main </c></premise>
<response>Synchronize the origin <c>main</c> branch with the local <c>main</c> branch.</response>
</match>
<match>
<premise><c>git merge &lt;source&gt; </c></premise>
<response>Add changes to source branch into the active branch</response>
</match>
<match>
<premise><c>git stage &lt;file&gt;</c></premise>
<response>Indicate that changes to a file should be included in the next commit.</response>
</match>
<match>
<premise><c>git commit -m "&lt;message&gt;"</c></premise>
<response>Add staged changes to the active branch.</response>
</match>
<match>
<premise><c>git push origin "&lt;branch&gt;"</c></premise>
<response>Copy the named branch to your origin repository.</response>
</match>
</matches>
<hint>
<p>
Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
</p>
</hint>
</introduction>
<task xml:id="ex-git-commands-summary-merging-pt1" label="ex-git-commands-summary-merging-pt1">
<statement></statement>
<matches>
<match>
<premise><c>git switch &lt;branch&gt; </c></premise>
<response>Change the active branch.</response>
</match>
<match>
<premise><c>git pull upstream main </c></premise>
<response>Synchronize the local <c>main</c> branch with the upstream <c>main</c> branch.</response>
</match>
<match>
<premise><c>git push origin main </c></premise>
<response>Synchronize the origin <c>main</c> branch with the local <c>main</c> branch.</response>
</match>
</matches>
<hint>
<p>
Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
</p>
</hint>
</task>

<task xml:id="ex-git-commands-summary-merging-pt2" label="ex-git-commands-summary-merging-pt2">
<statement></statement>
<matches>
<match>
<premise><c>git merge &lt;source&gt; </c></premise>
<response>Add changes to source branch into the active branch</response>
</match>
<match>
<premise><c>git stage &lt;file&gt;</c></premise>
<response>Indicate that changes to a file should be included in the next commit.</response>
</match>
<match>
<premise><c>git commit -m "&lt;message&gt;"</c></premise>
<response>Add staged changes to the active branch.</response>
</match>
<match>
<premise><c>git push origin &lt;branch&gt;</c></premise>
<response>Copy the named branch to your origin repository.</response>
</match>
</matches>
<hint>
<p>
Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
</p>
</hint>
</task>
</exercise>

</exercises>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,9 @@
</var>
</setup>
<hint>
Be sure you are using your GitHub origin repository (see <xref ref="ex-fork-url" />). This clone URL should contain your GitHub username and end in <c>.git</c>.
<p>
Review what you did in <xref ref="ex-merge-main-into-had-pig" />.
</p>
</hint>
</exercise>

Expand All @@ -261,7 +263,7 @@
label="ex-merge-main-into-feature">
<introduction>
<p>
Now let's try top merge the changes in the <c>main</c> branch into your feature branch.
Now let's try to merge the changes in the <c>main</c> branch into your feature branch.
</p>
</introduction>
<task>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
<choice>
<statement>
<p>
The feature branch can be merged automatically because there all of the changes are non-conflicting.
The feature branch can be merged automatically because all of the changes are non-conflicting.
</p>
</statement>
<feedback>
Expand Down Expand Up @@ -516,7 +516,7 @@
xml:id="ex-merge-conflict-2-computation" label="ex-merge-conflict-2-computation">
<statement>
<p>
Study the program in <xref ref="fig-merge-conflicts-2" />. Then choose the statement below that best describes the computation the program is trying to perform. gNote: The <c>**</c> operator indicates exponentiation, so <c>x**2</c> computes x squared.
Study the program in <xref ref="fig-merge-conflicts-2" />. Then choose the statement below that best describes the computation the program is trying to perform. Note: The <c>**</c> operator indicates exponentiation, so <c>x**2</c> computes x squared.
</p>
</statement>
<choices randomize="yes">
Expand Down Expand Up @@ -695,7 +695,7 @@
<choice correct="yes">
<statement>
<p>
The feature branch can be merged automatically because there all of the changes are non-conflicting.
The feature branch can be merged automatically because all of the changes are non-conflicting.
</p>
</statement>
<feedback>
Expand Down