From 8eca7c9c41fec4f4af8e604a43890b37dc44d98d Mon Sep 17 00:00:00 2001 From: Grant Braught Date: Tue, 7 Oct 2025 15:54:12 +0000 Subject: [PATCH 1/3] changes matches to cardsort so latex/pdf will build --- .../sec-the-issue-tracker.ptx | 18 ++++++-- .../sec-git-command-summary.ptx | 8 ++-- .../sec-resolving-a-merge-conflict.ptx | 45 +++++++++++++++++-- .../sec-lets-do-it-again.ptx | 4 +- .../sec-creating-a-pull-request.ptx | 30 ++++++++----- 5 files changed, 82 insertions(+), 23 deletions(-) diff --git a/source/ch-communities-and-collaboration/sec-the-issue-tracker.ptx b/source/ch-communities-and-collaboration/sec-the-issue-tracker.ptx index 4be8904..282d7b6 100644 --- a/source/ch-communities-and-collaboration/sec-the-issue-tracker.ptx +++ b/source/ch-communities-and-collaboration/sec-the-issue-tracker.ptx @@ -26,7 +26,6 @@ Exploring the Issue Tracker - <exercise xml:id="ex-find-the-issue-tracker" label="ex-find-the-issue-tracker" > @@ -55,7 +54,6 @@ </statement> </task> </exercise> - <exercise xml:id="ex-explore-the-issue-tracker" label="ex-explore-the-issue-tracker" > <introduction> <p> @@ -349,7 +347,6 @@ </hint> </task> - <task xml:id="ex-explore-the-issue-tracker-e" label="ex-explore-the-issue-tracker-e" > <statement> <p> @@ -363,7 +360,20 @@ </p> </feedback> - <matches> <match> <premise>Created on</premise> <response>Find issues you have not seen before</response> </match> <match> <premise>Last updated</premise> <response>Check if any issues you have been assigned to have had their requirements changed</response> </match> <match> <premise>Total comments</premise> <response>Find which issues are being most actively worked on</response> </match> </matches> + <cardsort> + <match> + <premise>Created on</premise> + <response>Find issues you have not seen before</response> + </match> + <match> + <premise>Last updated</premise> + <response>Check if any issues you have been assigned to have had their requirements changed</response> + </match> + <match> + <premise>Total comments</premise> + <response>Find which issues are being most actively worked on</response> + </match> + </cardsort> <hint> <p> Choose the best match. diff --git a/source/ch-merge-conflicts/sec-git-command-summary.ptx b/source/ch-merge-conflicts/sec-git-command-summary.ptx index 347c7ba..74d7edb 100644 --- a/source/ch-merge-conflicts/sec-git-command-summary.ptx +++ b/source/ch-merge-conflicts/sec-git-command-summary.ptx @@ -22,7 +22,7 @@ </introduction> <task xml:id="ex-git-commands-summary-merging-pt1" label="ex-git-commands-summary-merging-pt1"> <statement></statement> - <matches> + <cardsort> <match> <premise><c>git switch <branch> </c></premise> <response>Change the active branch.</response> @@ -35,7 +35,7 @@ <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> + </cardsort> <hint> <p> Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter. @@ -45,7 +45,7 @@ <task xml:id="ex-git-commands-summary-merging-pt2" label="ex-git-commands-summary-merging-pt2"> <statement></statement> - <matches> + <cardsort> <match> <premise><c>git merge <source> </c></premise> <response>Add changes from source branch into the active branch</response> @@ -62,7 +62,7 @@ <premise><c>git push origin <branch></c></premise> <response>Copy the named branch to your origin repository.</response> </match> - </matches> + </cardsort> <hint> <p> Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter. diff --git a/source/ch-merge-conflicts/sec-resolving-a-merge-conflict.ptx b/source/ch-merge-conflicts/sec-resolving-a-merge-conflict.ptx index 97c6d85..948da1f 100644 --- a/source/ch-merge-conflicts/sec-resolving-a-merge-conflict.ptx +++ b/source/ch-merge-conflicts/sec-resolving-a-merge-conflict.ptx @@ -68,7 +68,20 @@ </p> </statement> - <matches> <match> <premise>Feature branch contents</premise> <response> Appears with a green highlight at the top of the conflict information. </response> </match> <match> <premise>Best common ancestor</premise> <response> Appears with a gray highlight in the middle of the conflict information. </response> </match> <match> <premise><c>main</c> branch contents</premise> <response> Appears with a blue highlight at the bottom of the conflict information. </response> </match> </matches> + <cardsort> + <match> + <premise>Feature branch contents</premise> + <response> Appears with a green highlight at the top of the conflict information. </response> + </match> + <match> + <premise>Best common ancestor</premise> + <response> Appears with a gray highlight in the middle of the conflict information. </response> + </match> + <match> + <premise><c>main</c> branch contents</premise> + <response> Appears with a blue highlight at the bottom of the conflict information. </response> + </match> + </cardsort> </task> @@ -79,7 +92,24 @@ </p> </statement> - <matches> <match> <premise> Left Chevrons <c><<<<<<<</c> </premise> <response> Indicate the start of the merge conflict information. </response> </match> <match> <premise> Vertical Bars <c>|||||||</c> </premise> <response> Separate the feature branch content from the best common ancestor. </response> </match> <match> <premise>Equal Signs <c>=======</c></premise> <response> Separate the best common ancestor from the <c>main</c> branch content. </response> </match> <match> <premise> Right Chevrons <c>>>>>>>></c> </premise> <response> Indicate the end of the merge conflict information. </response> </match> </matches> + <cardsort> + <match> + <premise> Left Chevrons <c><<<<<<<</c> </premise> + <response> Indicate the start of the merge conflict information. </response> + </match> + <match> + <premise> Vertical Bars <c>|||||||</c> </premise> + <response> Separate the feature branch content from the best common ancestor. </response> + </match> + <match> + <premise>Equal Signs <c>=======</c></premise> + <response> Separate the best common ancestor from the <c>main</c> branch content. </response> + </match> + <match> + <premise> Right Chevrons <c>>>>>>>></c> </premise> + <response> Indicate the end of the merge conflict information. </response> + </match> + </cardsort> </task> </exercise> </exercises> @@ -134,7 +164,16 @@ </p> </statement> - <matches> <match> <premise> Accept Current Change </premise> <response> Accept the changes in your feature branch. </response> </match> <match> <premise> Accept Incoming Change </premise> <response> Accept the changes in the <c>main</c> branch. </response> </match> </matches> + <cardsort> + <match> + <premise> Accept Current Change </premise> + <response> Accept the changes in your feature branch. </response> + </match> + <match> + <premise> Accept Incoming Change </premise> + <response> Accept the changes in the <c>main</c> branch. </response> + </match> + </cardsort> <hint> <p> Compare the terms used in the merge tool options to the information displayed in the first and last lines of the merge conflict information. diff --git a/source/ch-staying-synchronized/sec-lets-do-it-again.ptx b/source/ch-staying-synchronized/sec-lets-do-it-again.ptx index 29cb730..3fa57aa 100644 --- a/source/ch-staying-synchronized/sec-lets-do-it-again.ptx +++ b/source/ch-staying-synchronized/sec-lets-do-it-again.ptx @@ -221,7 +221,7 @@ Match the Git commands will you use for each of the tasks indicated below. </p> </statement> - <matches> + <cardsort> <match> <premise> <c>git branch <branch></c> @@ -262,7 +262,7 @@ Push your feature branch to your origin. </response> </match> - </matches> + </cardsort> <hint> <p> The command reference that you created in <xref ref="topic-git-command-summary-upstreaming" text="type-global-title" /> may come in handy here. diff --git a/source/ch-upstreaming-changes/sec-creating-a-pull-request.ptx b/source/ch-upstreaming-changes/sec-creating-a-pull-request.ptx index 5876498..e30cd77 100644 --- a/source/ch-upstreaming-changes/sec-creating-a-pull-request.ptx +++ b/source/ch-upstreaming-changes/sec-creating-a-pull-request.ptx @@ -107,11 +107,16 @@ Match the right hand column with either head repository or base repository to indicate which term refers to your origin and which refers to the upstream. </p> </statement> - <matches> <match> - <premise> - <c>head repository</c></premise> <response>your origin repository</response> </match> <match> - <premise> - <c>base repository</c></premise> <response>the upstream</response> </match> </matches> + <cardsort> + <match> + <premise><c>head repository</c></premise> + <response>your origin repository</response> + </match> + <match> + <premise><c>base repository</c></premise> + <response>the upstream</response> + </match> + </cardsort> <hint> <p> The base is where you want your changes merged into/the repository you created your fork from. @@ -129,11 +134,16 @@ Match the right hand column with either base branch or compare branch to indicate which is “pulled from” or “merged into”. </p> </statement> - <matches> <match> - <premise> - <c>base branch</c></premise> <response>merged into</response> </match> <match> - <premise> - <c>compare branch</c></premise> <response>pulled from</response> </match> </matches> + <cardsort> + <match> + <premise><c>base branch</c></premise> + <response>merged into</response> + </match> + <match> + <premise><c>compare branch</c></premise> + <response>pulled from</response> + </match> + </cardsort> <hint> <p> The base is where you want your changes merged into. From 05f59db5b094fbaf25c53238a9c8d010ec7ddf58 Mon Sep 17 00:00:00 2001 From: Oscar Levin <oscar.levin@gmail.com> Date: Wed, 7 Jan 2026 15:26:10 -0500 Subject: [PATCH 2/3] Update pretext and devcontainer version (#114) **Pull Request Description** This updates the devcontainer to use the most recent version of PreTeXt, which fixes issues with the theme not building. --- **Licensing Certification** GitKit is a [Free Cultural Work](https://freedomdefined.org/Definition) and all accepted contributions are licensed as described in the LICENSE.md file. This requires that the contributor holds the rights to do so. By submitting this pull request **I certify that I satisfy the terms of the [Developer Certificate of Origin](https://developercertificate.org/)** for its contents. --- .../devcontainer.json | 55 ++++++++------- .devcontainer/installPandoc.sh | 17 +++++ .github/workflows/pretext-cli.yml | 40 ++++++++--- .github/workflows/pretext-deploy.yml | 68 +++++++++++++++++++ .gitignore | 9 ++- requirements.txt | 4 +- 6 files changed, 152 insertions(+), 41 deletions(-) rename .devcontainer.json => .devcontainer/devcontainer.json (54%) create mode 100644 .devcontainer/installPandoc.sh create mode 100644 .github/workflows/pretext-deploy.yml diff --git a/.devcontainer.json b/.devcontainer/devcontainer.json similarity index 54% rename from .devcontainer.json rename to .devcontainer/devcontainer.json index 732ab66..5d62838 100644 --- a/.devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,33 +1,29 @@ -// <!-- Managed automatically by PreTeXt authoring tools --> -// (delete the above line to manage this file manually) +// This file was automatically generated with PreTeXt 2.34.0. +// If you modify this file, PreTeXt will no longer automatically update it. +// ////////////////////////////////////////////////////////////// // -// This file provides configuration options so that a PreTeXt +// This file provides configuration options so that a PreTeXt // project can be edited and built using GitHub's Codespaces. // It is recommended to keep this in your repository even if you -// do not use this feature, as it will allow other to explore -// your project easily. -// This file will be automatically generated by PreTeXt with the +// do not use this feature, as it will allow other to explore +// your project easily. +// This file will be automatically generated by PreTeXt with the // latest updates unless you remove the first comment line above. // /////////////////////////////////////////////////////////////// { - "name": "PreTeXt-Codespaces", - - // This Docker image includes some LaTeX support, but is still not to large. Note that if you keep your codespace running, it will use up your GitHub free storage quota. Additional options are listed below. - "image": "oscarlevin/pretext:small", - // If you need to generate more complicated assets (such as sageplots) or use additional fonts when building to PDF, comment out the above line and uncomment the following line. - // "image": "oscarlevin/pretext:full", - // If you only intend to build for web and don't have any latex-image generated assets, you can use a smaller image: - // "image": "oscarlevin/pretext:lite", + // "image": "pretextbook/pretext-full:1.6", // uses latest image from https://hub.docker.com/r/PreTeXtBook/pretext-full/tags + // If you don't need sagemath, you can use a smaller base image. Comment out the line above and uncomment the line below to use a smaller image. + "image": "pretextbook/pretext:1.6", + "features": {"ghcr.io/devcontainers/features/github-cli": {}}, - // Add gh cli as a feature (to support codechat) - "features": { - "ghcr.io/devcontainers/features/github-cli:1": {} - }, + // The pretext-full image above includes pretext, prefigure, and enough parts of latex and sagemath for most cases. Here we install additional dependencies. + "postCreateCommand": { + "install pandoc": "bash ./.devcontainer/installPandoc.sh", + "mark repo as safe": "git config --global --add safe.directory $(pwd)" + }, - // Respect the project's designated dependencies - "postCreateCommand": "pip install -r requirements.txt", // Port forwarding // --------------- @@ -60,28 +56,31 @@ } }, + // Configure tool-specific properties. "customizations": { "codespaces": { - "openFiles": ["source/main.ptx"] + "openFiles": ["README.md"] }, "vscode": { "settings": { "editor.quickSuggestions": { "other": "off" }, - "editor.snippetSuggestions": "top", - "xml.validation.enabled": false, + "editor.suggest.showProperties": false, + "editor.snippetSuggestions": "bottom", + "files.autoSave": "afterDelay", + "xml.validation.enabled": true, + "redhat.telemetry.enabled": false, "CodeChat.CodeChatServer.Command": "CodeChat_Server" }, "extensions": [ - "ms-vscode.live-server", "oscarlevin.pretext-tools", - "CodeChat.codechat" + "CodeChat.codechat", + "streetsidesoftware.code-spell-checker", + "alpinebuster.vscode-latex-table-editor", + "mathematic.vscode-pdf" ] } } - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" } diff --git a/.devcontainer/installPandoc.sh b/.devcontainer/installPandoc.sh new file mode 100644 index 0000000..e328b12 --- /dev/null +++ b/.devcontainer/installPandoc.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +# This file was automatically generated with PreTeXt 2.34.0. +# If you modify this file, PreTeXt will no longer automatically update it. + +wget https://github.com/jgm/pandoc/releases/download/3.8.3/pandoc-3.8.3-1-amd64.deb -O pandoc.deb + +# wait for 60 second and then double check that no other script is using apt-get: +sleep 60 +while fuser /var/lib/dpkg/lock >/dev/null 2>&1; do + echo "Waiting for apt-get to be free..." + sleep 15 +done +# Install pandoc +apt-get install -y --no-install-recommends ./pandoc.deb + +rm pandoc.deb diff --git a/.github/workflows/pretext-cli.yml b/.github/workflows/pretext-cli.yml index 22b8a3c..733504d 100644 --- a/.github/workflows/pretext-cli.yml +++ b/.github/workflows/pretext-cli.yml @@ -1,21 +1,27 @@ -# <!-- Managed automatically by PreTeXt authoring tools --> -# (delete the above line to manage this file manually) - +# This file was automatically generated with PreTeXt 2.34.0. +# If you modify this file, PreTeXt will no longer automatically update it. +# +# This workflow file can be used to automatically build a project and create +# an artifact for deployment. It can also be used to deploy the project to +# GitHub Pages or Cloudflare Pages. +# +# The workflow is triggered on pull requests or can be run manually. You can uncomment +# the `push` event to have it run on pushes to the main branch as well. name: PreTeXt-CLI Actions on: # Runs on pull requests pull_request: branches: ["*"] - # Runs on pushes to main - push: - branches: ["main"] + ## Runs on pushes to main + #push: + # branches: ["main"] # Runs on demand workflow_dispatch: jobs: build: runs-on: ubuntu-latest - container: oscarlevin/pretext:full + container: oscarlevin/pretext-full steps: - name: Checkout source @@ -24,8 +30,26 @@ jobs: - name: install deps run: pip install -r requirements.txt + - name: set up node + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: install local ptx files + run: pretext --version + - name: build deploy targets - run: pretext build --deploys + run: | + version="$(pretext --version)" + major="$(echo $version | cut -d '.' -f 1)" + minor="$(echo $version | cut -d '.' -f 2)" + if [ "$major" -ge 2 -a "$minor" -ge 5 ]; then + echo "PreTeXt version is 2.5 or greater; using new build command" + pretext build --deploys + else + echo "PreTeXt version is less than 2.5, using old build command" + pretext build + fi - name: stage deployment run: pretext deploy --stage-only diff --git a/.github/workflows/pretext-deploy.yml b/.github/workflows/pretext-deploy.yml new file mode 100644 index 0000000..085d330 --- /dev/null +++ b/.github/workflows/pretext-deploy.yml @@ -0,0 +1,68 @@ +# This file was automatically generated with PreTeXt 2.34.0. +# If you modify this file, PreTeXt will no longer automatically update it. +# + +name: Build and Deploy +on: + # Currently, this workflow only runs when manually selected (the `workflow_dispatch` event). + # If you would like it to run on other events, uncomment some of the lines below. + + # # Runs on pull requests + # pull_request: + # branches: ["*"] + + # # Runs on pushes to main + # push: + # branches: ["main"] + + # # Runs every day at 00:00 UTC + # schedule: + # - cron: '0 0 * * *' + + # Runs on demand + workflow_dispatch: + +permissions: + contents: write + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + container: oscarlevin/pretext-full + + steps: + - name: Checkout source + uses: actions/checkout@v4 + + - name: set up node + uses: actions/setup-node@v4 + with: + node-version: '22' + + - name: add gh-cli + run: | + apt-get update + apt-get install gh jq -y + + - name: setup git config + run: | + git config --global --add safe.directory $(pwd) + git config user.name "${{ github.actor }} via GitHub Actions" + git config user.email "${{ github.actor }}@github_actions.no_reply" + + - name: install deps + run: pip install -r requirements.txt --break-system-packages + + - name: install local ptx files + run: pretext --version + + - name: build deploy targets + run: pretext build --deploys + + - name: run deploy + run: pretext deploy --no-push + + - name: push gh-pages branch + run: git push origin gh-pages --force + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 0096a4e..c68d800 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -# <!-- Managed automatically by PreTeXt authoring tools --> -# (delete the above line to manage this file manually) - +# This file was automatically generated with PreTeXt 2.34.0. +# If you modify this file, PreTeXt will no longer automatically update it. +# # Boilerplate list of files in a PreTeXt project for git to ignore # ensure this file is tracked !.gitignore @@ -11,6 +11,7 @@ published # don't track assets generated from source generated-assets +.cache # don't track the executables.ptx file executables.ptx @@ -90,6 +91,8 @@ bh_unicode_properties.cache # https://packagecontrol.io/packages/sublime-github GitHub.sublime-settings +# Don't track common virtual environment directories +venv/ # Don't include Dropbox settings and caches .dropbox diff --git a/requirements.txt b/requirements.txt index d53edfa..2289048 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -# <!-- Managed automatically by PreTeXt authoring tools --> -pretext == 2.5.2 +# This file was automatically generated with PreTeXt 2.34.0. +pretext == 2.34.0 From 3f2bbd1ad907f23af8c0dc2c58b93250284c8ab7 Mon Sep 17 00:00:00 2001 From: Grant Braught <braught@dickinson.edu> Date: Wed, 14 Jan 2026 16:18:16 +0000 Subject: [PATCH 3/3] fixes deprecated pretext elements --- .../sec-basic-foss-workflow.ptx | 195 +++++++++++------- .../sec-git-command-summary.ptx | 57 +++-- ...-the-main-branch-into-a-feature-branch.ptx | 13 +- .../sec-git-command-summary.ptx | 4 +- .../sec-git-command-summary.ptx | 146 ++++++++----- 5 files changed, 273 insertions(+), 142 deletions(-) diff --git a/source/ch-communities-and-collaboration/sec-basic-foss-workflow.ptx b/source/ch-communities-and-collaboration/sec-basic-foss-workflow.ptx index a010fad..b318210 100644 --- a/source/ch-communities-and-collaboration/sec-basic-foss-workflow.ptx +++ b/source/ch-communities-and-collaboration/sec-basic-foss-workflow.ptx @@ -1,27 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> -<section xml:id="topic-basic-foss-workflow" xmlns:xi="http://www.w3.org/2001/XInclude" > +<section xml:id="topic-basic-foss-workflow" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Basic FOSS Workflow Concepts -

- Now that you have found an issue to work on, you will need to collaborate with the project community to fix that issue. - Collaboration in FOSS communities follows patterns of behavior known as workflows. - shows a basic version of one FOSS workflow that is used by contributors working on FOSS projects. -

+

Now that you have found an issue to work on, you will need to collaborate with the project + community to fix that issue. Collaboration in FOSS communities follows patterns of behavior + known as workflows. shows a basic version + of one FOSS workflow that is used by contributors working on FOSS projects.

-

+
A basic FOSS workflow. - Diagram showing the relationships between the main repo, your remote copy, and your local copy. + Diagram showing the relationships between the main repo, your remote copy, and your + local copy. Forking the main project repo creates your remote copy in your GitHub space. Cloning your remote copy creates your local copy in your local development environment. - Changes that you make to your local copy can be contributed to the main project by pushing them to your remote copy and creating a pull request. + Changes that you make to your local copy can be contributed to the main project by + pushing them to your remote copy and creating a pull request.
@@ -29,81 +30,127 @@ - - <introduction> - <p> - The exercises in this section will help to familiarize you with the terminology and the process of this basic FOSS workflow. - </p> - </introduction> - - <exercise xml:id="ex-github-repository-terminology" label="ex-github-repository-terminology" > - <statement> + <title /> + <introduction> <p> - GitHub uses specific terminology to refer to the copies of the repository. - Match the GitHub terminology on the left with the repository in <xref ref="fig-basic-foss-workflow" /> to which it refers on the right. + The exercises in this section will help to familiarize you with the terminology and the + process of this basic FOSS workflow. </p> - </statement> + </introduction> - <matches> <match> <premise>Upstream</premise> <response>Main project repository</response> </match> <match> <premise>Origin</premise> <response>Your Remote Copy</response> </match> <match> <premise>Local Clone</premise> <response>Local Copy of Your Remote Copy</response> </match> </matches> - <hint> - <p> - Review the diagrams of the basic FOSS workflow from the in the class materials. - </p> - </hint> - </exercise> + <exercise xml:id="ex-github-repository-terminology" label="ex-github-repository-terminology"> + <statement> + <p> GitHub uses specific terminology to refer to the copies of the repository. Match the + GitHub terminology on the left with the repository in <xref ref="fig-basic-foss-workflow" /> + to which it refers on the right. </p> + </statement> - <exercise xml:id="ex-workflow-step-definitions" label="ex-workflow-step-definitions" > - <statement> - <p> - <xref ref="fig-basic-foss-workflow" /> illustrates a basic FOSS workflow similar to what is used in many FOSS projects. This workflow has the following 5 steps: <term>Fork</term>, <term>Clone</term>, <term>Edit</term>, <term>Push</term>, and <term>Pull Request</term>. Match each term on the left with the appropriate description on the right. - </p> - </statement> + <cardsort> + <match> + <premise>Upstream</premise> + <response>Main project repository</response> + </match> + <match> + <premise>Origin</premise> + <response>Your Remote Copy</response> + </match> + <match> + <premise>Local Clone</premise> + <response>Local Copy of Your Remote Copy</response> + </match> + </cardsort> + <hint> + <p> + Review the diagrams of the basic FOSS workflow from the in the class materials. + </p> + </hint> + </exercise> - <matches> <match> <premise>Fork</premise> <response> Create a copy of the main project repository in your GitHub space. </response> </match> <match> <premise>Clone</premise> <response> Create a copy of your remote copy of the repository into your local development environment. </response> </match> <match> <premise>Edit</premise> <response> Make changes to your local copy of the repository (e.g. to fix a bug). </response> </match> <match> <premise>Push</premise> <response> Copy your changes into your remote copy of the repository. </response> </match> <match> <premise>Pull Request</premise> <response> Ask that the project maintainers incorporate your changes into the main project repository. </response> </match> </matches> - <hint> - <p> - Review the diagrams of the basic FOSS workflow from the in the class materials. - </p> - </hint> - </exercise> + <exercise xml:id="ex-workflow-step-definitions" label="ex-workflow-step-definitions"> + <statement> + <p> + <xref ref="fig-basic-foss-workflow" /> illustrates a basic FOSS workflow similar to what + is used in many FOSS projects. This workflow has the following 5 steps: <term>Fork</term>, <term> + Clone</term>, <term>Edit</term>, <term>Push</term>, and <term>Pull Request</term>. Match + each term on the left with the appropriate description on the right. </p> + </statement> - <exercise xml:id="ex-workflow-step-order" label="ex-workflow-step-order" > - <statement> - <p> - Drag the steps of the basic FOSS workflow into the order that they are likely to occur when working on a project. - </p> - </statement> - <blocks> <block order="3"> - <p> - Fork - </p> - </block> <block order="1"> + <cardsort> + <match> + <premise>Fork</premise> + <response> Create a copy of the main project repository in your GitHub space. </response> + </match> + <match> + <premise>Clone</premise> + <response> Create a copy of your remote copy of the repository into your local development + environment. </response> + </match> + <match> + <premise>Edit</premise> + <response> Make changes to your local copy of the repository (e.g. to fix a bug). </response> + </match> + <match> + <premise>Push</premise> + <response> Copy your changes into your remote copy of the repository. </response> + </match> + <match> + <premise>Pull Request</premise> + <response> Ask that the project maintainers incorporate your changes into the main project + repository. </response> + </match> + </cardsort> + <hint> + <p> + Review the diagrams of the basic FOSS workflow from the in the class materials. + </p> + </hint> + </exercise> - <p> - Clone - </p> - </block> <block order="5"> + <exercise xml:id="ex-workflow-step-order" label="ex-workflow-step-order"> + <statement> + <p> + Drag the steps of the basic FOSS workflow into the order that they are likely to occur + when working on a project. + </p> + </statement> + <blocks> + <block order="3"> + <p> + Fork + </p> + </block> + <block order="1"> - <p> - Edit - </p> - </block> <block order="2"> + <p> + Clone + </p> + </block> + <block order="5"> - <p> - Push - </p> - </block> <block order="4"> + <p> + Edit + </p> + </block> + <block order="2"> - <p> - Pull Request - </p> - </block> </blocks> + <p> + Push + </p> + </block> + <block order="4"> - <hint> - <p> - Imagine the process you would go through when starting to work on a project, fixing a bug, and contributing your changes back to the main project. - </p> - </hint> - </exercise> + <p> + Pull Request + </p> + </block> + </blocks> + + <hint> + <p> + Imagine the process you would go through when starting to work on a project, fixing a bug, + and contributing your changes back to the main project. + </p> + </hint> + </exercise> </exercises> </section> \ No newline at end of file diff --git a/source/ch-communities-and-collaboration/sec-git-command-summary.ptx b/source/ch-communities-and-collaboration/sec-git-command-summary.ptx index 846ece2..79140ef 100644 --- a/source/ch-communities-and-collaboration/sec-git-command-summary.ptx +++ b/source/ch-communities-and-collaboration/sec-git-command-summary.ptx @@ -1,30 +1,53 @@ <?xml version="1.0" encoding="UTF-8"?> -<section xml:id="topic-git-commands-summary-communities" xmlns:xi="http://www.w3.org/2001/XInclude" > +<section xml:id="topic-git-commands-summary-communities" xmlns:xi="http://www.w3.org/2001/XInclude"> <title>Git Command Summary

- It will take a while for this process and all of the commands to become a natural part of the way you work. - To help speed that process, this section provides a chance to collect and review the Git commands that were used in this chapter. + It will take a while for this process and all of the commands to become a natural part of the + way you work. + To help speed that process, this section provides a chance to collect and review the Git + commands that were used in this chapter.

- - <exercise xml:id="ex-git-commands-summary-communities" label="ex-git-commands-summary-communities"> - <statement> - <p> - Match the tasks on the right with the appropriate git command listed on the left. - </p> - </statement> + <title /> + <exercise xml:id="ex-git-commands-summary-communities" + label="ex-git-commands-summary-communities"> + <statement> + <p> + Match the tasks on the right with the appropriate git command listed on the left. + </p> + </statement> - <matches> <match> <premise> <c>git config</c> </premise> <response> Display Git settings. </response> </match> <match> <premise> <c>git remote -v</c> </premise> <response> List your remote repos. </response> </match> <match> <premise> <c>git clone <URL></c> </premise> <response> Create a copy of the origin repository in your development environment. </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> - </exercise> + <cardsort> + <match> + <premise> + <c>git config</c> + </premise> + <response> Display Git settings. </response> + </match> + <match> + <premise> + <c>git remote -v</c> + </premise> + <response> List your remote repos. </response> + </match> + <match> + <premise> + <c>git clone <URL></c> + </premise> + <response> Create a copy of the origin repository in your development environment. </response> + </match> + </cardsort> + <hint> + <p> + Note that the tasks listed are in approximately the same order as they appear in the + sections of this chapter. + </p> + </hint> + </exercise> </exercises> </section> \ No newline at end of file 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 07b6a74..239ebb6 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 @@ -53,7 +53,18 @@ </p> </statement> - <matches> <match order="1"> <premise><c>main</c></premise> <response>Source Branch</response> </match> <match order="2"> <premise>feature branch (<c>hadPig</c>)</premise> <response>Target Branch</response> </match> </matches> + <cardsort> + <match> + <premise order="1"> + <c>main</c> + </premise> + <response>Source Branch</response> + </match> + <match> + <premise order="2">feature branch (<c>hadPig</c>)</premise> + <response>Target Branch</response> + </match> + </cardsort> <hint> <p> Read the introduction to this section. diff --git a/source/ch-staying-synchronized/sec-git-command-summary.ptx b/source/ch-staying-synchronized/sec-git-command-summary.ptx index 07ddf2f..b5c0f39 100644 --- a/source/ch-staying-synchronized/sec-git-command-summary.ptx +++ b/source/ch-staying-synchronized/sec-git-command-summary.ptx @@ -23,7 +23,7 @@ Refer back to the sections in this chapter to see what each command does. </p> </feedback> - <matches> + <cardsort> <match> <premise> <c>git remote -v</c> @@ -72,7 +72,7 @@ Delete a feature branch from your origin </response> </match> - </matches> + </cardsort> <hint> <p> Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter. diff --git a/source/ch-upstreaming-changes/sec-git-command-summary.ptx b/source/ch-upstreaming-changes/sec-git-command-summary.ptx index f374308..1735995 100644 --- a/source/ch-upstreaming-changes/sec-git-command-summary.ptx +++ b/source/ch-upstreaming-changes/sec-git-command-summary.ptx @@ -12,54 +12,104 @@ <exercises> <title /> - <exercise xml:id="ex-git-commands-summary-upstreaming" label="ex-git-commands-summary-upstreaming"> - <statement> - <p> - Match the tasks on the right with the appropriate git command listed on the left. - </p> - </statement> - <matches> <match> - <premise> - <c>git log</c></premise> <response>Display recent commits made to the active branch.</response> </match> <match> - <premise> - <c>git branch <branch></c></premise> <response>Create a new feature branch.</response> </match> <match> - <premise> - <c>git branch</c></premise> <response>Lists all branches.</response> </match> <match> - <premise> - <c>git switch <branch></c></premise> <response>Change the active branch</response> </match> <match> - <premise> - <c>git status</c></premise> <response>Check the current state of your local repo.</response> </match> <match> - <premise> - <c>git diff</c></premise> <response>Displays unstaged changes.</response> </match> <match> - <premise> - <c>git diff --staged</c></premise> <response>Displays staged changes.</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> - </exercise> + <exercise xml:id="ex-git-commands-summary-upstreaming" + label="ex-git-commands-summary-upstreaming"> + <statement> + <p> + Match the tasks on the right with the appropriate git command listed on the left. + </p> + </statement> + <cardsort> + <match> + <premise> + <c>git log</c> + </premise> + <response>Display recent commits made to the active branch.</response> + </match> + <match> + <premise> + <c>git branch <branch></c> + </premise> + <response>Create a new feature branch.</response> + </match> + <match> + <premise> + <c>git branch</c> + </premise> + <response>Lists all branches.</response> + </match> + <match> + <premise> + <c>git switch <branch></c> + </premise> + <response>Change the active branch</response> + </match> + <match> + <premise> + <c>git status</c> + </premise> + <response>Check the current state of your local repo.</response> + </match> + <match> + <premise> + <c>git diff</c> + </premise> + <response>Displays unstaged changes.</response> + </match> + <match> + <premise> + <c>git diff --staged</c> + </premise> + <response>Displays staged changes.</response> + </match> + </cardsort> + <hint> + <p> + Note that the tasks listed are in approximately the same order as they appear in the + sections of this chapter. + </p> + </hint> + </exercise> - <exercise xml:id="ex-git-commands-summary-upstreaming-2" label="ex-git-commands-summary-upstreaming-2"> - <statement> - <p> - Match the tasks on the right with the appropriate git command listed on the left. - </p> - </statement> - <matches> <match> - <premise> - <c>git stage <file name></c></premise> <response>Stage changed files to be committed to the repo.</response> </match> <match> - <premise> - <c>git add <file name></c></premise> <response>Another way to stage changed files for a commit.</response> </match> <match> - <premise> - <c>git commit -m "message"</c></premise> <response>Commit staged files with a message.</response> </match> <match> - <premise> - <c>git push <remote> <branch></c></premise> <response>Push a feature branch to your origin.</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> - </exercise> + <exercise xml:id="ex-git-commands-summary-upstreaming-2" + label="ex-git-commands-summary-upstreaming-2"> + <statement> + <p> + Match the tasks on the right with the appropriate git command listed on the left. + </p> + </statement> + <cardsort> + <match> + <premise> + <c>git stage <file name></c> + </premise> + <response>Stage changed files to be committed to the repo.</response> + </match> + <match> + <premise> + <c>git add <file name></c> + </premise> + <response>Another way to stage changed files for a commit.</response> + </match> + <match> + <premise> + <c>git commit -m "message"</c> + </premise> + <response>Commit staged files with a message.</response> + </match> + <match> + <premise> + <c>git push <remote> <branch></c> + </premise> + <response>Push a feature branch to your origin.</response> + </match> + </cardsort> + <hint> + <p> + Note that the tasks listed are in approximately the same order as they appear in the + sections of this chapter. + </p> + </hint> + </exercise> </exercises> </section>