From b8a5b970c5b5bc15d4fddf0630d219748773b128 Mon Sep 17 00:00:00 2001 From: test Date: Sun, 16 Feb 2025 19:32:41 +0000 Subject: [PATCH 1/2] patches to chapter 5 --- source/ch-merge-conflicts/sec-extra-practice.ptx | 13 ++++++------- ...erging-the-main-branch-into-a-feature-branch.ptx | 6 ++++-- .../sec-understanding-merge-conflicts.ptx | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/source/ch-merge-conflicts/sec-extra-practice.ptx b/source/ch-merge-conflicts/sec-extra-practice.ptx index e44916c..d606e62 100644 --- a/source/ch-merge-conflicts/sec-extra-practice.ptx +++ b/source/ch-merge-conflicts/sec-extra-practice.ptx @@ -45,7 +45,7 @@

- Use the following command to get this feature branch from the upstream into your local repo: git fetch upstream merge-conflict-practice + 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: git fetch upstream merge-conflict-practice

@@ -252,7 +252,7 @@

- +

1 @@ -264,7 +264,7 @@

- +

2 @@ -344,7 +344,7 @@ - +

Carry out the steps you identified above in and give a link to your pull request. @@ -355,8 +355,7 @@ - - +

Thank you. @@ -366,7 +365,7 @@

- 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 https://github.com/upstreamLocation/upstreamReop/pulls/xx, where xx is a number.

diff --git a/source/ch-merge-conflicts/sec-merging-the-main-branch-into-a-feature-branch.ptx b/source/ch-merge-conflicts/sec-merging-the-main-branch-into-a-feature-branch.ptx index f0dbb6e..aaeb5ca 100644 --- a/source/ch-merge-conflicts/sec-merging-the-main-branch-into-a-feature-branch.ptx +++ b/source/ch-merge-conflicts/sec-merging-the-main-branch-into-a-feature-branch.ptx @@ -252,7 +252,9 @@ - Be sure you are using your GitHub origin repository (see ). This clone URL should contain your GitHub username and end in .git. +

+ Review what you did in . +

@@ -261,7 +263,7 @@ label="ex-merge-main-into-feature">

- Now let's try top merge the changes in the main branch into your feature branch. + Now let's try to merge the changes in the main branch into your feature branch.

diff --git a/source/ch-merge-conflicts/sec-understanding-merge-conflicts.ptx b/source/ch-merge-conflicts/sec-understanding-merge-conflicts.ptx index 3e8acc1..373dae8 100644 --- a/source/ch-merge-conflicts/sec-understanding-merge-conflicts.ptx +++ b/source/ch-merge-conflicts/sec-understanding-merge-conflicts.ptx @@ -373,7 +373,7 @@

- 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.

@@ -516,7 +516,7 @@ xml:id="ex-merge-conflict-2-computation" label="ex-merge-conflict-2-computation">

- Study the program in . Then choose the statement below that best describes the computation the program is trying to perform. gNote: The ** operator indicates exponentiation, so x**2 computes x squared. + Study the program in . Then choose the statement below that best describes the computation the program is trying to perform. Note: The ** operator indicates exponentiation, so x**2 computes x squared.

@@ -695,7 +695,7 @@

- 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.

From b2c03843aa4a97ef452dcb895272e3c488c01ea7 Mon Sep 17 00:00:00 2001 From: test Date: Sun, 16 Feb 2025 19:40:00 +0000 Subject: [PATCH 2/2] split exercise to table isn't too long --- .../sec-git-command-summary.ptx | 89 +++++++++++-------- 1 file changed, 52 insertions(+), 37 deletions(-) diff --git a/source/ch-merge-conflicts/sec-git-command-summary.ptx b/source/ch-merge-conflicts/sec-git-command-summary.ptx index 93d8196..037db17 100644 --- a/source/ch-merge-conflicts/sec-git-command-summary.ptx +++ b/source/ch-merge-conflicts/sec-git-command-summary.ptx @@ -15,46 +15,61 @@ <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 <...> notation indicates parameters that are needed to customize each use. </p> - </statement> - <matches> - <match> - <premise><c>git switch <branch> </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 <source> </c></premise> - <response>Add changes to source branch into the active branch</response> - </match> - <match> - <premise><c>git stage <file></c></premise> - <response>Indicate that changes to a file should be included in the next commit.</response> - </match> - <match> - <premise><c>git commit -m "<message>"</c></premise> - <response>Add staged changes to the active branch.</response> - </match> - <match> - <premise><c>git push origin "<branch>"</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 <branch> </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 <source> </c></premise> + <response>Add changes to source branch into the active branch</response> + </match> + <match> + <premise><c>git stage <file></c></premise> + <response>Indicate that changes to a file should be included in the next commit.</response> + </match> + <match> + <premise><c>git commit -m "<message>"</c></premise> + <response>Add staged changes to the active branch.</response> + </match> + <match> + <premise><c>git push origin <branch></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>