diff --git a/.gitkit-cspell.txt b/.gitkit-cspell.txt
index 840d6ba..3e826b8 100644
--- a/.gitkit-cspell.txt
+++ b/.gitkit-cspell.txt
@@ -1,5 +1,4 @@
automations
-devenv
farmdata
foss
gitkit
@@ -9,7 +8,6 @@ halign
HFOSSedu
inclusivity
kitclient
-nbsp
opensource
POGIL
Runestone
diff --git a/README.md b/README.md
index 3c71d5c..7729e19 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,9 @@
This repository contains the pretext source for the GitKit Runestone texts.
-If you are interested in using the GitKit Text please see the Instructor Guide in the text on Runestone by using one of the following link: [GitKit](https://runestone.academy/ns/books/published/gitkitlinux/the-gitkit-book.html?mode=browsing)
+If you are interested in using the GitKit Text please see the Instructor Guide in the text on Runestone by using one of the following links:
+- [GitKit (Linux Desktop Edition)](https://runestone.academy/ns/books/published/gitkitlinux/the-gitkit-book.html?mode=browsing) - students work in a full Linux desktop environment in this edition.
+- [GitKit (VSCode Edition)](https://runestone.academy/ns/books/published/gitkitvscode/the-gitkit-book.html?mode=browsing) - students work within the VSCode IDE in this edition.
## Licensing
@@ -299,19 +301,76 @@ An `
+ This text appears only in the Linux Kit Client versions.
+
+ This text appears only in the VSCode Kit Client versions.
+
+
- The next step in the basic FOSS workflow is to ensure that you have a
+ The next step in the basic FOSS workflow is to ensure that you have a
-
- In order to clone a repository into your development environment you will need the
+ In some development environments cloning the origin requires that you use a command like
- Visit the GitHub page for your origin repository.
-
- You can find the URl of your origin (i.e.
- your fork of the GitKit FarmData2 upstream) in your answer to
- Find and click the green "Code" button.
-
- Open the "Local" and "HTTPS" tabs as shown here:
- Copy and paste the clone URL that you will use to clone your origin as your answer to this exercise.
-
-
-
- Thank you.
-
- It looks like you might be trying to use the upstream repository instead of your origin.
-
- It looks like you might be trying to use the upstream repository instead of your origin.
-
- The clone URL should have the format
- Be sure you are using your GitHub origin repository (see
- The
- Now that you have the clone URL for your origin repository, use the steps in this section to clone your origin into your development environment.
-
- The
- Give a command that will clone your origin into your development environment.
+
+ However, the development environment you have opened in GitPod simplifies this process for you. Recall, that you provided the URL of your origin repository when opening the development environment in
-
-
- Thank you.
-
- It looks like you might be trying to use the upstream repository instead of your origin.
-
- It looks like you might be trying to use the upstream repository instead of your origin.
-
- Be sure to replace
- Execute your command from
- Which of the following appear in the output from entering the command from
- Look at the output in your terminal.
-
- Which line of output from entering the command from
- Look for a line in the output that begins with "Cloning into".
-
- Use the
- If it it does not, check the output in
- In this section you will briefly explore the GitKit FarmData2 repository that you have cloned into your development environment.
-
- Use the
- See
- Use the
- Compare these files and directories to those in your origin repository on GitHub.
-
- Check all files and directories that do not appear both locally and on GitHub.
-
-
-
-
-
-
-
- In this section you will see that your clone keeps track of the location of your origin repository.
- It does this using a piece of information called a
- The command
- If you want to have git display the URLs of the remotes as well, you will need to add the
- Which command will show you the URL(s) of the remote(s) that git knows about?
-
+ Copy and paste the clone URL that you will use to clone your origin as your answer to this exercise.
+
+
+
-
+ Thank you.
+
+ It looks like you might be trying to use the upstream repository instead of your origin.
+
+ It looks like you might be trying to use the upstream repository instead of your origin.
+
+ The clone URL should have the format
+ Now that you have the clone URL for your origin repository, use the tasks in this exercise to clone your origin into your development environment.
+
-
-
-
- You are asking
- Execute the command
- The "origin" lines have a URL with your GitHub username in them.
-
- There are lines that say "origin".
+ Look for a line in the output that begins with "Cloning into".
- The "origin" lines have a URL that points to GitHub.
+ Use the
- It is not possible to tell from the output.
+ If it it does not, check the output in
- Look closely at the "origin" URLs.
-
- How is the origin remote that you see in the output of the
+ The the output in
+ The "Kit-tty" introduces itself using the line
+ "😺💻 Meow, Kit-tty here!" Read the description of the "Kit-tty" that follows this line.
+
+ Be sure to keep your eyes open for messages from the Kit-tty as you work on the GitKit exercises. The Kit-tty will help you to stay on track and may save you a lot of time by preventing you from going down an incorrect path.
+
+ Use the final line of output in
- The orange dotted arrow from the clone to the origin repository.
+ What does the "IMPORTANT" line ask you to do?
+ Close the terminal and open a new one.
+
+ Take the Kit-tty for a walk.
+
+ I'm sure the Kit-tty would like that, but its not the correct answer.
+
+ Use the
+ Delete some unnecessary files.
+
- The orange dotted arrow from the origin to the upstream repository.
+ If you haven't already, close the Terminal you are currently using and open a new one.
- The orange dotted arrow from the clone to the upstream repository.
+ There is a technical reason for having to close your current Terminal and open a new. But the details for why this is necessary are unimportant.
+ In this exercise you will briefly explore the GitKit FarmData2 repository that you have cloned into your development environment.
+
- The blue "Clone" arrow from the origin to the cloned repository.
+ Use the
- The origin remote is not represented in the figure.
+ See
- Which arrow would represent the clone knowing the location of the origin?
-
- Which step of the basic FOSS workflow requires that your clone know the location of your origin repository?
-
- Pull request
+ Use the
- Fork
+ Compare these files and directories to those in your origin repository on GitHub. Are there any differences? If so describe them here.
- Clone
-
+ The development environment displays the files and directories contained in your clone in the "Explorer" panel at the left of the window. You can also see a list of these files and directories by using the
+ Compare these files and directories to those in your origin repository on GitHub. Are there any differences? If so describe them here.
+
+ In this exercise you will see that your clone keeps track of the location of your origin repository. It does this using a piece of information called a
- Edit
+ Use the following command to ask Git to display a list of the remote repositories (i.e. those on GitHub) that it knows about:
- Push
+
- Think about which step of the basic FOSS workflow will need to send information from the clone back to the origin.
-
- You cloned your GitKit-FarmData2 respitory into a folder in your development environment with the command in
- But, you need to reopen your development environment in that folder to take advantage of all of the features that the KitClient provides for you.
-
- Open the GitKit-FarmData2 folder.
-
- You can do this by going to the "hamburger" (≡) menu in the upper left of your development environment window.
-
- Choose
- Select the
- You will see
- The the output in
- Your personal virtual assistant.
+ Copy and paste the output of the
- A terminal.
+ Examine the output in
+ The "origin" lines have a URL with your GitHub username in them.
+
+ There are lines that say "origin".
+
+ The "origin" lines have a URL that points to GitHub.
+
+ It is not possible to tell from the output.
+
- A teletypewriter.
+ How is the origin remote that you see in the output of the
+ The orange dotted arrow from the clone to the origin repository.
+
+ The orange dotted arrow from the origin to the upstream repository.
+
+ The orange dotted arrow from the clone to the upstream repository.
+
+ The blue "Clone" arrow from the origin to the cloned repository.
+
+ The origin remote is not represented in the figure.
+
- A pet kitten.
+ Which step of the basic FOSS workflow requires that your clone know the location of your origin repository?
- The "Kit-tty" introduces itself using the line "😺💻 Meow, Kit-tty here!" Read the description of the "Kit-tty" that follows this line.
-
- Be sure to keep your eyes open for messages from the Kit-tty as you work on the GitKit exercises.
- The Kit-tty will help you to stay on track and may save you a lot of time by preventing you from going down an incorrect path.
-
- You have been assigned an
- To work on your issue you will need to setup a
- Many FOSS contributors will setup the development environment on their personal machines. However, because student machines vary greatly the GitKit provides a browser based development environment that you will access using your web browser. This development environment is guaranteed to be the same for everyone that uses it. It includes a code editor, development tools, and a few features designed specifically to help you stay on track when completing the GitKit's hands-on exercises.
-
- In this section you will create a new development environment, learn how to stop and restart the development environment, and do some necessary configuration of Git.
+ Many FOSS contributors will setup the development environment on their personal machines. Because student machines vary greatly the GitKit provides a browser based development environment, called a
- The development environment will run in the cloud using a service called
+ Your development environment will run in the cloud using a service called GitPod. Visit
- The following tasks will guide you through the process of creating the development environment.
+ The following tasks will guide you through the process of starting and configuring your development environment.
- Ensure that you are logged into the GitHub account that you listed in
- Click this link to
- Click the "Create new codespace" button on the page that appears.
+ Click the "Continue" button and wait for a few minutes until output that is similar to that shown here to appear:
+
+
- Wait for the development environment to be created. Your browser window will refresh and change a few times during the creation process. Please be patient as this can take a few minutes.
-
- After a few minutes, your browser window will look similar to
- If you do not see the prompt asking you to paste your PAT after a few minutes try:
-
- Reloading your browser tab.
-
- Clearing your browser cache and reloading your browser tab.
-
- Checking that your browser is
-
+ Click the link in your output that is similar to the one that is shown above.
- Paste the PAT that you created in
- If you have lost or did not save your PAT, revisit
- After pasting your PAT, the development environment will finish being created. When the development environment is fully created your browser window will look similar to
- At some point you will complete an assignment or want to take a break and do other things. When you do so, you should stop the development environment. This will ensure that you do not consume more of your free Codespaces time than necessary. -
-- Use the following steps to practice stopping the development environment. + There are a few additional things that you can to to make working in your development environment more convenient.
- Click on the word "Codespaces" in the bottom left of the browser window. -
+ Use the following steps to make the development environment fill and resize with your browser window. + +- Select "Stop Current Codespace" from the menu that appears in the top center of the browser window. + To simplify pasting answers into this text, it is recommended that you open the text using the Firefox browser within the local development environment.
-
- Close the browser tab containing the development environment.
+ Copy and paste within the development environment can be done via an application's "Edit" menu, the "right click" menu, or keyboard shortcuts. This tutorial on
+ Copy and paste between your host machine and the development environment can be done, but it requires that you paste the content into the "Clipboard" on the "noVNC Menu".
- When you return to work after stopping the development environment, you will need to restart it. -
-- Use the following steps to restart the development environment. + The following tasks will guide you through the process of starting and configuring your development environment.
- Click here to
- Click the "Resume this codespace" button.
+ Paste the URL of your GitKit FarmData2 repository from
- Do not click the "Create a new one" button because a new development environment will not contain any of your prior work.
+ Choose "VS Code..." as the "Editor - Browser" and "Standard" as the machine "Class" as shown here:
+
+
- Please be patient as this can take a few minutes. When the development environment is ready you will see the message "Kit development environment is ready for use" and your browser window will look similar to
+ Click the "Continue" button and wait for the development environment to open in the browser. It will appear similar to the window shown in
+
+ A message box may appear in the lower right corner of the development environment asking if you would like to reopen the project in "VS Code Desktop". If this happens you can click the "X" to close the box, or ignore it and it will go away on its own. +
+ In the "TERMINAL" tab at the bottom of the window you should see "😺💻 Meow, Kit-tty here!" in the output. Read the associated text. + + What is the Kit-tty? +
+
Your development environment includes a
- There are lots of different Git clients. Some are graphical and some use a text interface. These exercises, introduce you to Git using the text-based Git
- The Git CLI is accessed by using the Terminal. Use the following steps to open a Terminal.
- Using the
- Enter the command
+ You will interact with Git using its command line interface via a Terminal. Use the following steps access the Terminal.
+
+ Click on the "TERMINAL" tab near the bottom of the development environment window to make the Terminal active. +
+
- Use the output from the
-
- The
-
- Check the output of the
+ Recall from class that Git repositories maintain a complete history of all changes, including who made each change. To do this, Git needs to know a little bit of information about you. +
++ Git identifies the author of each change using two pieces of information: A name and an e-mail. For name, you might decide to your full name, or a nickname, or your GitHub username. Just keep in mind that whatever name you use will be associated with all of the changes you make. For e-mail, you can again use any valid e-mail associated with you. +
++ The tasks in this exercise will guide you through the process of configuring the Git client in your development environment. +
+
-
- Check the output of the
+ Replace
-
+
+ Replace
- Check the output of the
- Check the output of the
+ Give the output of this command as your answer for this task. +
+- Git repositories maintain a complete history of all changes, including who made each change. To do this, Git needs to know a little bit of information about you. -
-
- Git identifies the author of each change using two pieces of information: A
- The exercises in this section will guide you through the process of configuring your name and email in the Git client in the development environment. + There are a few GitPod settings that you can change that will make working with your development environment more convenient.
- The
- Give a command that will set the name you want to have associated with your changes by replacing
- -
-- This command will set the name associated with your changes in git. -
-- You should not include the < and > in your command. -
-- Be sure to use quotation marks around your name. -
-- Reread the question and check the format of your command. -
-
- The
- Give a command that will set the email you want to have associated with your changes by replacing
- -
-- This command will set the email associated with your changes in git. -
-- Be sure you have entered a valid email address. -
-- You should not include the < and > in your command. -
-- Be sure to use quotation marks around your email. -
-- Reread the question and check the format of your command. -
-
- Enter your commands from
- Then use the command
-
-
-
+ This will
-
-
+ If your development environment times out and stops you can restart it using the steps in
+ At some point you will complete this assignment or want to take a break and do other things. When you do so, you should stop your development environment. +
++ You can stop your development environment using the following steps. +
+
-
-
+ When you already have a GitKit development environment and want to continue working on the GitKit exercises, you will need to
+ Restart your development environment using the following steps. +
+
-
-
-
Thank you. @@ -104,105 +104,63 @@
- Make sure you are giving the URL for your fork, not the project's URL. Review
+ Clone your origin (i.e. your fork) for the project you selected into your development environment. +
- Pick and order the commands to change to your home directory, clone your fork of the project you chose and check its remotes. + Copy and paste the Git commands that you used and their output here.
+ Clone your origin (i.e. your fork) for the project you selected by creating a new development environment (i.e. workspace) for it in GitPod. Recall that creating a new GitPod workspace automatically clones the origin repository into the development environment. +
- Review
- In your terminal enter the commands from
- Which of the following do you see in the output of the
- The origin URL should be the one from your git clone command. -
-+ Use the Git command that displays the remotes that your local repository knows about. +
++ Copy and paste the Git commands that you used and their output here. +
+Thank you. @@ -72,13 +72,6 @@
- Looks like you might be trying to use the example above. That was just for illustration. Be sure to use the URL that your instructor has given you. -
-@@ -89,12 +82,7 @@
- Check the course materials from your instructor. It should provide the URL of the GitKit FarmData2 repository that was created for your course. -
-- The URL should include something that refers to your course name, not your GitHub username. -
+ Check the course materials from your instructor. It should provide the URL of the GitKit FarmData2 repository that was created for your course.
- Click the “Fork” button to create your own fork of the upstream repository. Be sure to pick the GitHub username that is at the end of the URL you used in
Thank you. @@ -177,13 +165,6 @@
- Looks like you might be trying to use the example above. That was just for illustration. Be sure to use the URL that your instructor has given you. -
-@@ -194,9 +175,7 @@
- The URL you give here should contain your GitHub username. Be sure you are looking the copy of the GitKit FarmData2 repository that is in your GitHub space. -
+ The URL you give here should contain your GitHub username. Be sure you are looking the copy of the GitKit FarmData2 repository that is in your GitHub space.
- Visit your origin repository on GitHub. There is a link on that page that corresponds to the orange dashed arrow in
- forked from -
-- The Octokitty (GitHub) logo -
-- Fork your own copy of (in the Fork drop-down) -
-- This text and link will be near the repository name in the upper left corner of the window. -
+ This text and link will be near the repository name in the upper left corner of the window.- Think about which step of the basic FOSS workflow needs to send information back to the main project. -
+ Think about which step of the basic FOSS workflow needs to send information back to the main project.- But, it did not make a copy of the issue tracker and its issues into your GitHub space. -
-- Why do you think the designers of GitHub decided that the issue tracker should not be copied into the fork? + Did it also make a copy of the issue tracker and its issues into your GitHub space? What reasons can you think of for why the designers of GitHub decided that the issue tracker should not be copied into the fork?
-- Because it would be hard for the maintainers of the original project to find issues entered in forks. -
-- Because contributors would not know which issue tracker to enter new issues into. -
-- Because it would be hard to keep issue descriptions and discussions up-to-date across multiple issue trackers. -
-- Because only the maintainers of the original project should be allowed to add new issues. -
-- Why would it be confusing to have multiple issue trackers for a project? -
-
- There are a number of roles that tend to exist in FOSS communities. Some of these include
+ You will be using GitHub in many of the exercises in this text. In order to use GitHub it is necessary that you have an account. +
+
+ If you do not have a GitHub account, or would like to have a separate account just for this course, you can create a GitHub account here:
+ If you already have a GitHub account that you would like to use for this class, skip to the next exercise. +
+
+ Give the full URL to your GitHub profile, for example
+ +
++ Thank you. +
++ Please give the full URL using the format indicated in the question. +
+- You will be using GitHub in many of the exercises in this text. - In order to use GitHub it is necessary that you have an account and a Personal Access Token. - You will also configure your GitHub Codespaces to help conserve your free useage time. -
-
- If you do not have a GitHub account, or would like to have a separate account just for this course, you can create a GitHub account here:
- When you have a GitHub account to use for this class, move on to the next exercise. -
-
- Give the full URL to your GitHub profile, for example
- -
-- Thank you. -
-- Please give the full URL using the format indicated in the question. -
-
- When starting your development environment for the first time (in
- A PAT is like a password but has some security benefits. - In particular, you can have multiple different PATs. - Each one can have different limits on what can be done with it and each one can be revoked individually without affecting the others. -
- -
- Follow GitHub's instructions for creating a (classic) personal access token:
- When doing so be sure to: -
- Choose “repo” for the “scopes and permissions.” -
-- Be sure to copy and paste your PAT somewhere safe – maybe e-mail it to yourself. - You will not be able to retrieve it again after you leave the page. -
-- What are the first 4 characters of your GitHub PAT? -
-- gpat -
--
-- ghp_ -
-- All GitHub PATs begin with ghp_ -
-- PAT_ -
-- -
-- The GitKit development environment runs in GitHub Codespaces. GitHub provides you with approximately 60 hours per month of free Codespaces use. By default the GitKit development environment will timeout after 30 minutes of inactivity. It is recommended that you reduce this timeout to 15 minutes to avoid accidentally consuming your allotted free useage. -
-- Use the following steps to adjust the timeout for your Codespaces, including the GitKit developent environment. -
-
- Open your GitHub Codespaces settings by visiting
- Scroll down to the section labeled "Default idle timeout", adjust the timeout to 15 minutes, and click "Save". -
-
- FOSS projects often use an issue tracker to maintain a list of bugs to be fixed, features to be added and other tasks to be completed.
- Thus, the issue tracker is a good place to go in order to find something to work on in a FOSS project.
- The exercises in this section will guide you through interaction with the GitKit FarmData2 issue tracker as shown in
-
- The tasks in this exercise will help you to find the issue tracker for the GitKit FarmData2 repository that you will be using. -
-- Visit the URL that your instructor provided for the GitKit FarmData2 repository that you will be using as the upstream repository for your course. -
-
- Click the "Issues" tab near the top of the page to go to the issue tracker.
- This will take you to a page similar to the one shown in
- Use the issue tracker in the GitKit FarmData2 repository to complete the following tasks. -
-+ Visit the URL that your instructor provided for the GitKit FarmData2 repository that you will be using as the upstream repository for your course. +
+
+ Click the "Issues" tab near the top of the page to go to the issue tracker. This will take you to a page similar to the one shown in
- Every issue has a number and a title. - What is the title of issue #10? + Use the issue tracker in the GitKit FarmData2 repository to complete the following tasks.
-- Add Missing "that" -
-- Seeding Report: Allows Invalid Inputs -
-- Seeding Input: Duplicates appearing in Area Dropdown -
-- Dickinson College Farm Link -
-
+
+ Every issue has a number and a title. What is the title of issue #10?
+
+ Add Missing "that"
+
+ Seeding Report: Allows Invalid Inputs
+
+ Seeding Input: Duplicates appearing in Area Dropdown
+
+ Dickinson College Farm Link
+
- Each issue can have
+
+ Each issue can have
- Which file in the repo would you need to modify in order to fix the typo described in issue #11? -
-+ Which file in the repo would you need to modify in order to fix the typo described in issue #11? +
+- Be sure you are looking at issue #11. -
-- Match issue tracker sort orders on the left to a reason for sorting in that order on the right. -
-- You can do it! Try again! -
-- Choose the best match. -
-+ Pick one of the sort orders that can be used with issues and briefly explain why it might be useful to sort the issues in that order. +
+
Because projects often have many people working asynchronously many will have a process by which contributors can
- Examine the GitKit FarmData2 issue tracker. - How can you tell which issue have already been assigned? -
-- Look for some lines for issues that look different than the others and hover your mouse over the different parts. -
-- In the GitKit FarmData2 issue tracker, contributors interested in working on an issue can request that it be assigned to them by commenting on the issue with the exact message: -
- -
-
- The first person who comments on an unclaimed issue with this message will receive a response from the project maintainers.
- This messages will indicate that the issue has been assigned to them and the issue tracker will update to show this as you saw in
- Use the GitKit FarmData2 issue tracker to complete the following tasks. -
-- Choose an unassigned issue with a "Round 1" tag. + Examine the GitKit FarmData2 issue tracker. + How can you tell which issue have already been assigned?
- See
- Comment on the issue that you chose using the
- Click on the issue title to open the issue and use the "Add a comment" box at the bottom of the page. -
-
- Remember you must type
+ In the GitKit FarmData2 issue tracker, contributors interested in working on an issue can request that it be assigned to them by commenting on the issue with the exact message: +
+ +
+
+ The first person who comments on an unclaimed issue with this message will receive a response from the project maintainers. This messages will indicate that the issue has been assigned to them and the issue tracker will update to show this as you saw in
- Reload the issue tracker and check that you received a response and that the issue has been assigned to you. + Use the GitKit FarmData2 issue tracker to complete the following tasks.
- If you did not receive a response, wait a few minutes and reload the issue tracker page again.
- Sometimes it takes a few minutes for your comment to be noticed and the issue to be assigned.
- If you still do not receive a response check that you typed
- If you received a response telling you that you were not assigned the issue, someone else slipped a comment in just ahead of you and was assigned the issue.
- If this happens, just try
- Give the full URL to the issue that you have been assigned, for example
- -
-- Thank you. -
-- Please give the full URL using the format indicated in the question. -
-- It is worth noting that different projects will have different processes for claiming and assigning issues, and some projects may not assign issues at all. - What are some advantages and disadvantages of assigning issues to specific individuals? -
-- Select each of the statements that describe an advantage of assigning issues. -
-- You can do it! Try again! -
-- To prevent wasting effort by having two developers work on the same issue. + Choose an unassigned issue with a "Round 1" tag.
-
- Assigning issues can help prevent people from duplicating work.
+ Comment on the issue that you chose using the
- Allow a developer to "hold on" to an issue, even if they are not currently working on it. + Reload the issue tracker and check that you received a response and that the issue has been assigned to you.
- Holding onto an issue that is not being worked on may prevent someone else from working on it. -
-
- To plan in advance who will be working each issue.
+ If you did not receive a response, wait a few minutes and reload the issue tracker page again. Sometimes it takes a few minutes for your comment to be noticed and the issue to be assigned. If you still do not receive a response check that you typed
- Assigning issues could work like creating a ToDo list for core project contributors.
+ If you received a response telling you that you were not assigned the issue, someone else slipped a comment in just ahead of you and was assigned the issue. If this happens, just try
+
+ Give the full URL to the issue that you have been assigned, for example
+ +
++ Thank you. +
++ Please give the full URL using the format indicated in the question. +
++ It is worth noting that different projects will have different processes for claiming and assigning issues, and some projects may not assign issues at all. What are some advantages and disadvantages of assigning issues to specific individuals? +
+
- The GitKit provides an introduction to the fundamental skills and concepts used in collaborative Free and Open Source Software (FOSS) development. It introduces Git and GitHub basics, and gives learners the experience of using the
- If at any point you have questions about the GitKit, need help getting setup to use it in a class, or have feedback for us, please
The GitKit is designed for use as a module within a traditional course to provide a first exposure to Git and GitHub. - It includes classroom materials, hands-on activities for labs or homework, project artifacts (repository, code, documentation, issues) captured from a genuine FOSS project, and a cloud-based development environment. The classroom materials focus on the introduction of concepts and terminology. The hands-on activities reinforce the in-class material while guiding learners through the forking workflow in the context of an authentic FOSS project. The activities are structured such that each new Git command and GitHub operation is introduced as the need for it arises in the forking workflow. + It includes classroom materials, hands-on activities for labs or homework, project artifacts (repository, code, documentation, issues) captured from a genuine FOSS project, and a cloud-based development environment. + The classroom materials focus on the introduction of concepts and terminology. + The hands-on activities reinforce the in-class material while guiding learners through the forking workflow in the context of an authentic FOSS project. + The activities are structured such that each new Git command and GitHub operation is introduced as the need for it arises in the forking workflow.
- The GitKit minimizes prerequisite knowledge and hardware requirements. Learners are expected to have basic familiarity with files, directories and the Unix/Linux command line (e.g.
+ If you have questions about the GitKit, need help getting setup to use it in a class, or have feedback for us, please
-
+
+
- Some students will give the URL of the upstream GitKit-FarmData2 repository for the course instead of their origin repository. A few may even give the URL of a real FarmData2 upstream repository. + Some students will try to clone the upstream GitKit-FarmData2 repository instead of their origin repository. A few may even attempt to clone the real FarmData2 repository. The Kit-tty should prevent this and provide a helpful tip.
-
- Some students will try to clone the upstream GitKit-FarmData2 repository for the course or even give the URL of a real FarmData2 upstream repository. + Checking the origin remote that is given as the answer to this question will confirm that the student has correctly cloned their origin. Again, the Kit-tty should prevent them doing this incorrectly, but if somehow it did not catching and correcting this early is important.
-
- Checking the origin remote that is given as the answer to this question will confirm that the student has correctly cloned their origin. Again, the Kit-tty should prevent them doing this incorrectly, but if somehow it did not catching and correcting this early is important. + The answer to this question will reasonably differ depending upon when students complete the exercise. There are initially 3 issues that are pre-assigned to the user that deployed the GitKit. Students who complete the exercise early are likely to all identify these issues. As additional students claim issues, other students will identify those claimed issues as well.
- For questions or assistance with GitKit, you can
+ Note that you are currently viewing the
+
- Note that the reading assignments in the course pack include sections that allow students to elect to participate in a research project aimed at (1) understanding what they think and know about open source tools and techniques and (2) assessing the effectiveness of the GitKit. The inclusion of these sections is optional and they may be removed at the discretion of the instructor. See
- Click to
- One deploy of the GitKit FarmData2 repository can support up to 32 students. Perform as many deploys as necessary for your course. Be sure to give each deploy a distinct name when prompted by the deployer. + One deploy of the GitKit FarmData2 repository can support up to 32 students. Perform as many deploys as necessary for your course. Be sure to give each deploy a distinct name.
- Please consider clicking the link to the brief survey that is included in the output of the GitKit deployer. Your feedback helps us to better understand where and how the GitKit is being used. This survey can also be accessed
- Read
- Consider doing the GitKit for yourself as described in
- Follow the steps in
- Refer to
- The GitKit content is broken into 4 chapters (See
@@ -159,18 +167,18 @@
- Students complete the hands-on activities contained in each chapters of this text as 2-3 hours of homework or during assigned lab periods. + Students complete the hands-on activities contained in the chapters of this text as 2-3 hours of homework or during an assigned lab period.
- While the GitKit was designed for nominal delivery in four 50-75-minute periods with 2-3 hours of additional hands-on work by the students, instructors have found the GitKit to be adaptable to different educational settings, student experience levels and learning objectives. Some examples include: + While the GitKit was designed for nominal delivery in four 50-75-minute periods with 2-3 hours of additional hands-on work by the students, instructors have found the GitKit to be adaptable to different educational settings, student experience levels and learning objectives.
- Limited Coverage: The first two GitKit topics form a cohesive unit and can be completed without continuing onto the final two topics. + Limited Coverage: The first two GitKit topics form a cohesive unit and can be completed without continuing onto the final two topics. Two examples of how this can be used include:
- A One Day Workshop: An organization has delivered the GitKit as a one-day workshop for students from low-income, first-generation, underrepresented minority backgrounds. This workshop covered just the first two GitKit topics. + A One Day Workshop: An organization delivered the GitKit as a one-day workshop for students from low-income, first-generation, underrepresented minority backgrounds. This workshop covered just the first two GitKit topics.
- Students with Prior Git Experience: An instructor with students who have had prior exposure to Git fundamentals (but not GitHub or the forking workflow) have skipped most of the class materials and used the hands-on activities as in-class lab activities rather than homework. + Students with Prior git Experience: An instructor with students who have had prior exposure to git fundamentals (but not GitHub or the forking workflow) have skipped most of the class materials and used the hands-on activities as in-class lab activities rather than homework.
- The content of the GitKit is broken into the chapters below. + The content of the GitKit is broken into the chapters below. For each chapter the key topics and activities are outlined and links are given to the slides, the chapter of the text containing the hands-on exercises and instructor notes for the chapter.
@@ -227,7 +235,7 @@
- Introduces feature branches, commits, and pull requests as part of the forking workflow. + Introduces feature branches, commits, and pull requests as part of the forking workflow.
- Provides practice with understanding merge conflicts, merging
- The GitKit provides a cloud based development environment that students use to complete the hands-on GitKit activities. This development environment, which we call a
-
+
+
+ There is a different edition of this text for each of the KitClients. The texts provide an equivalent experience, but adapt content to the specifics (e.g. user interface elements) of the KitClient as necessary. The instructor will adopt the text for the KitClient that has been chosen for the course (see
-
- The Kit-tty (a play on Kit and TTY), pronounced kitty, is a virtual assistant built into the development environment. The Kit-tty has been designed to catch and correct student errors that were frequently observed in early uses of the GitKit. Many of the errors caught by the Kit-tty are those that would not be discovered until students progress several steps further into the activity, at which point they can be difficult to undo. + The Kit-tty (a play on Kit and TTY), pronounced kitty, is a virtual assistant built into the development environments (i.e. KitClients) that catches common student errors and provides hints on how to perform activity steps correctly. The Kit-tty has been designed to catch and correct student errors that were frequently observed in early uses of the GitKit. Many of the errors recognized by the Kit-tty are those that typically are not discovered until students progress several steps further into the activity, at which point they require more advanced git skills to undo.
For example, the Kit-tty intervenes when a student attempts to:
- commit to the
- merge a feature branch into
- Students claim an issue by adding a comment to its ticket in the issue tracker. An automation notices this comment and assigns the issue to the student (if it hasn't already been assigned to someone else). The automation then also responds personally as a maintainer might: "Great! I assigned you (@TheirUsername) to the issue. Have fun working on it!" + When claiming an issue by adding a comment to its ticket in the issue tracker. An automation notices this comment, assigns the issue to the student (if it hasn't already been assigned to someone else). The automation then also responds personally as a maintainer might: "Great! I assigned you (@TheirUsername) to the issue. Have fun working on it!"
- The captured repository is from an earlier version of FarmData2. Current active development work on FarmData2 is occurring in the
- The GitKit text is an e-text that is available on
@@ -389,23 +438,30 @@
+ Note that you are currently viewing the
+
You can either
- The course pack includes a
- If you adopt the course pack you can modify the sections and questions that are included in the assignments, how they are graded and also add your own questions. See the
-
-
- Review the Slide Notes for the chapter for helpful instructor tips. + Review the Slide Notes for the chapter.
- Click this link to
- Click the green "Create new codespace" button. -
-
- Creating the codespace requires a few minutes. When it is complete will see the prompt in
- The GitHub username or the name of a GitHub organization to which you have write permission as the location to deploy the upstream repository. + You GitHub username to deploy into your GitHub space, or the name of a GitHub organization to which you have write permission to deploy into that organization's GitHub space.
- Wait for the deployer to complete. This typically takes several minutes because the deployer must create the issues in the issue tracker slowly to avoid being rate-limited by the GitHub API. + Wait for the deployer to complete. This typically takes several minutes because the deployer must create the issues in the issue tracker slowly to avoid being rate-limited by the GitHub API.
- When the deployer completes it will generate output similar
+
Copy the URL of the repository and distribute it to your students using e-mail, LMS or whatever means is convenient for you.
@@ -616,7 +642,7 @@
- Please consider visiting the link to the brief survey that is included in the output of the GitKit deployer. Your feedback helps us to better understand where and how the GitKit is being used. This survey can also be accessed
- For any kind of question, difficulty, suggestion, or suspected bug,
@@ -715,7 +741,7 @@
- Active work on the deployer and the KitClient takes place in the
- At the start of this chapter students will have made pull requests for the "Round 2" issues. Initially GitHub will report that these PRs can be merged automatically. However, the instructor will begin this topic by introducing changes to the upstream
- This chapter then focuses on the resolution of merge conflicts. The concepts of merge commits, common ancestors, best common ancestor, and non-conflicting and conflicting changes are introduced. The topic then covers the process of merging main into a feature branch, git's raw conflict information and the use of a basic merge tool. The hands-on activity concludes with the students having resolved the merge conflict in their "Round 2" pull request. Note that these PRs are never merged into the upstream as part of the GitKit activities. + This chapter then focuses on the resolution of merge conflicts. The concepts of merge commits, common ancestors, best common ancestor, and non-conflicting and conflicting changes are introduced. The topic then covers the process of merging main into a feature branch, git's raw conflict information and the use of graphical merge tool. The hands-on activity concludes with the students having resolved the merge conflict in their "Round 2" pull request. Note that these PRs are never merged into the upstream as part of the GitKit activities.
The exercises in this chapter have the students perform the following major tasks: @@ -32,7 +32,7 @@
- Use VS Code's basic merge tool to resolve the conflict. + Use the VS Code merge tool to resolve the conflict.
- Shows the basic graphical merge tool that is built into VS Code. The exercises guide the students through use this tool to resolve the conflicts in their PRs for their "Round 2" issues. + Shows the graphical merge tool that is built into VS Code. The exercises guide the students through use this tool to resolve the conflicts in their PRs for their "Round 2" issues.
- These slides are hidden by default. They show a more advanced graphical merge tool that is also built into VS Code. The exercises do not use this merge tool, but some instructors may wish to show or demonstrate it. -
-Here for review and reference and not much time needs to be spent on these slides. The final slide collects into one diagram everything that is a part of the forking workflow. It has a lot going on, but by this point students should be able to make sense of each of the actions that are illustrated. @@ -195,30 +187,37 @@
-
- In these exercises there are no conflicting changes and the merge would be able to be completed automatically. However, if all of the non-conflicting changes are merged into the result the program will not produce the correct result. The point being that automatic merges can check for structural conflicts, but not logical or semantic conflicts and thus caution should be used when performing merges. + In this exercise there are no conflicting changes and the merge would be able to be completed automatically. However, if all of the non-conflicting changes are merged into the result the program will not produce the correct result. The point being that automatic merges can check for structural conflicts, but not logical or semantic conflicts and thus caution should be used when performing merges.
-
- Inevitably some students will be behind on their work and will complete their sync with upstream main after you have merged the PR for the addRound2Conflicts branch. In these cases, their pull requests will not create a conflict to be resolved.
+ Inevitably some students will be behind on their work and will complete their sync with upstream main after you have merged the PR for the addRound2Conflicts branch. In these cases, their pull requests will not create a conflict to be resolved. These students should follow the instructions given in mergeConflictPractice branch and create a pull request for it. That PR will then contain conflicts with the changes in the addRound2Conflicts branch that was merged into main. They will then complete the activity using the mergeConflictPractice branch as it it were their feature branch. Students not in this situation, but who would like additional practice can also pull and use the mergeConflictPractice branch at the end of the activity.
+
- These students should follow the instructions given in mergeConflictPractice branch and create a pull request for it. That PR will then contain conflicts with the changes in the addRound2Conflicts branch that was merged into main. They will then complete the activity using the mergeConflictPractice branch as it it were their feature branch. Students not in this situation, but who would like additional practice can also pull and use the mergeConflictPractice branch at the end of the activity.
+ By default, VS Code does not display the best common ancestor in its merge tool. The steps given in these questions has the students change the VS Code configuration such that it includes the best common ancestor.
-
diff --git a/source/ch-instructor-guide/sec-instructor-synchronization.ptx b/source/ch-instructor-guide/sec-instructor-synchronization.ptx index cc95e36..6c83aed 100644 --- a/source/ch-instructor-guide/sec-instructor-synchronization.ptx +++ b/source/ch-instructor-guide/sec-instructor-synchronization.ptx @@ -142,7 +142,7 @@ Note
- This set of materials may be a little short for a 75-minute class period. The remaining class time can be used to help students who had difficulties creating a PR, whose PR's cannot be merged automatically or are missing the "Closes" or "Fixes" lines. + This set of materials may be a little short for a 75-minute class period. The remaining class time can be used to help students who had difficulties creating a PR, who's PR's cannot be merged automatically or are missing the "Closes" or "Fixes" lines.
-
+
+
@@ -214,7 +217,7 @@
-
diff --git a/source/ch-instructor-guide/sec-instructor-upstreaming.ptx b/source/ch-instructor-guide/sec-instructor-upstreaming.ptx index da8a6db..7747b42 100644 --- a/source/ch-instructor-guide/sec-instructor-upstreaming.ptx +++ b/source/ch-instructor-guide/sec-instructor-upstreaming.ptx @@ -7,7 +7,7 @@
- This chapter focuses on the upstreaming process. Students learn about feature branches, staging and committing changes, pushing feature branches to their origin repository, and making a pull request. At the end of the hands-on activity each student will have experienced the full forking workflow, resulting in a pull request to the upstream GitKit-FarmData2 repository for changes that fix the "Round 1" issue that they were assigned. The "Round 1" issues have been created such that they do not conflict with each other. Thus, all of the student pull requests should be able to be merged automatically. The instructor will typically perform these merges as a demonstration at the start of the class introducing
The exercises in this chapter have the students perform the following major tasks: @@ -138,11 +138,11 @@
-
- If a student is seeing commit dates, usernames and messages that differ from the correct answers then it is likely that they created their fork after PRs were merged at the start of
git status command here should show one untracked file with modifications and that file should agree with the file that they identified in
+
+ This question is a good checkpoint to ensure that they have done things correctly to this point. The most recent commit in the git log output should show that they committed changes to the correct file (i.e. the one from
diff --git a/source/ch-merge-conflicts/ch-merge-conflicts.ptx b/source/ch-merge-conflicts/ch-merge-conflicts.ptx
index 4bbf864..3185d92 100644
--- a/source/ch-merge-conflicts/ch-merge-conflicts.ptx
+++ b/source/ch-merge-conflicts/ch-merge-conflicts.ptx
@@ -8,14 +8,13 @@
- This chapter focuses on merge conflicts, why they arise and how they can be resolved. We saw that maintainers are regularly merging changes from contributor's pull requests into the upstream
diff --git a/source/ch-merge-conflicts/sec-confirming-the-merge-conflict.ptx b/source/ch-merge-conflicts/sec-confirming-the-merge-conflict.ptx
deleted file mode 100644
index 99f3471..0000000
--- a/source/ch-merge-conflicts/sec-confirming-the-merge-conflict.ptx
+++ /dev/null
@@ -1,329 +0,0 @@
-
-
-
- While you were working on your Round2 issue your instructor, playing the role of a maintainer, merged some changes into the upstream
-
- The changes that your instructor merged were specifically designed to create a conflict with the change that you made when you fixed your Round2 issue. Thus, the pull request you made in
- The activities in the remainder of this section will reinforce your understanding of how the conflict arose, confirm that your
- Complete the following tasks that ask about the current situation, which is illustrated in
- Which of the following commits (i.e. which color) in
- Dark Blue
-
- Correct.
-
- Lime Green
-
- The lime green commit is not in the upstream
- Brown
-
- The brown commit is not in the upstream
- Light Blue
-
- The light blue commit was added to the upstream
- Yellow
-
- The yellow commit was added to the upstream
- Look at which commits are in upstream
- Which of the following commits (i.e. which color) in
- Dark Blue
-
- The dark blue commit is already in the upstream
- Lime Green
-
- The lime green commit might create a merge conflict, but it is not your commit.
-
- Brown
-
- Correct!
-
- Light Blue
-
- The light blue commit is already in the upstream
- Yellow
-
- The yellow commit is already in the upstream
- Look for a commit in your local repository that might contain changes that could conflict with the changes in the dark blue commit.
-
- If everything is as we saw above, then the pull request that you created for your Round2 issue will contain a merge conflict with the upstream
- Visit the
- Find and click on your Round2 pull request.
-
- Scroll down toward the bottom of the pull request.
-
- Which of the following messages do you see?
-
- GitHub message indicating that merging can be performed automatically.
-
-
- When your pull request cannot be merged automatically, return to this question and continue. See your instructor if you cannot resolve this problem.
-
- GitHub message indicating that there are merge conflicts that must be resolved.
-
- Excellent. Everything is as it should be. Please continue to the next exercise.
-
- I don't see either of the other messages.
-
- If you see a message about GitHub checking if the merge can be performed automatically, wait a few moments for one of the other messages to appear.
-
- We now know that your Round2 pull request contains a merge conflict and cannot be merged automatically. Place the following actions into an order which could have created this merge conflict.
-
- You created a feature branch.
-
- Changes were merged into upstream main.
-
- You fixed your Round2 issue.
-
- You made your Round2 PR.
-
- For a conflict to occur the upstream
- When would you have to create your feature branch for the upstream
- To do the extra practice you'll need to have your development environment running.
-
- Click here to
+
+
- Please be patient as this can take a few minutes. When the development environment is ready you will see the message "Kit development environment is ready for use." and your browser window will look similar to the following:
+ The
+ I have fetched the branch +
+
- The upstream repository contains a branch created just for this extra practice. This branch was created so that it contains some pre-made conflicts with the upstream
- Use the following command to get this feature branch from the upstream into your local repo:
- Run the
- Which of the following branches are listed? -
-
-
- Correct. -
-
-
- Correct. -
-
-
- Are you sure this branch exists? -
-
-
- Are you sure this branch exists? -
-
- If you do not see the
+ I have not fetched the branch +
+
+ Do not make continue until you have the
- At this point you should think of the
- Assuming that your
-
-
-
-
- Review
- Merging the
- Execute the commands you selected in
- In which file were the merge conflicts created? -
-
-
- Correct. -
-
-
- Check the hint. -
-
-
- Check the hint. -
-
-
- Check the hint. -
-
-
- Check the hint. -
-
- The file containing the conflicts should have opened in the editor automatically when you performed the
+ I have resolved the conflicts +
+- How many merge conflicts were created? -
-- 1 -
-- Correct. -
-- 2 -
-- Check the hint. -
-- 3 -
-- Check the hint. -
-- More than 3. -
-- Check the hint. -
-
- Examine the
+ I have not resolved the conflicts +
++ Do not make continue until you resolve the conflicts. +
+- Choose and order the steps below to describe the sequence of things that you will do to resolve the merge conflicts that were created. + Save your changes and commit them to resolve the conflicts to your feature branch. Be sure to use a meaningful commit message. Give the commands that you used and their output here.
- Edit the merge conflict information. -
-
-
-
-
- Create a pull request to the upstream. -
-
- Carry out the steps you identified above in
-
+ Push the
- Thank you. -
-- Be sure that your URL is from your pull request to the upstream repository. -
-
- Review sections
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-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..7d0d980 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
@@ -8,383 +8,147 @@
- Your local and origin
+
+
-
-
- When two branches are merged the branch containing the changes to be merged is called the
-
+ If you are going to merge the changes from the
+ The
- Match the branch names to the appropriate term below.
+ To use the
- Read the introduction to this section. + What were the commands you used? And their output? You can copy your work into the provided textbox.
-
- Which commit (i.e. which color) in
- Dark blue with a brown ring. -
-
- Correct. The dark blue commit in
- Dark blue -
-
- The dark blue commit is a commit in the
- Brown -
-
- The brown commit is a commit in the
- Pink -
-
- The pink commit is a commit in the
- Light blue with a white ring. -
-
- The light blue with a white ring is a merge commit in
- Read the introduction to this section and examine
- The command
+ The output from
- Imagine that the
-
-
-
-
- To merge the
- Use the
- Use the
- Now that your feature branch is the active branch, give a command that will merge the
- + Find the part of the file that contains the raw conflict information and copy and paste it here. Be sure to include the chevrons at the top and bottom of the conflict information.
- Correct. -
-
- You want to merge the
- Review the format of the
- The command you want is in
- Now let's try top merge the changes in the
- Run your
- Which of the following statements best describes what happened when you ran your
- The terminal displays a message indicating "Automatic merge failed; fix conflicts and then commit the result." -
-
- Excellent! Because there is a merge conflict between the
- The "GNU nano" editor opens with the first line of text being "Merge branch 'main' into" your feature branch. -
-- Uh Oh! Something went wrong. Let's try to fix it. -
- Something else happened. -
-
- Double check that your
- Which of the following things also happened when you ran your
- The terminal displays a message indicating that there is a "Merge conflict in README.md." -
-- Correct. -
-
- The
- Correct. -
-- The conflict is automatically resolved. -
-- The conflict cannot be automatically resolved because there is a conflict. -
-- The development environment plays a sad song because there is a conflict. -
-- That would be fun, but unfortunately not. -
-- Look at the output in the terminal and the file that is open in the development environment. -
-
+ Sometimes when you try to merge, and it fails due to a conflict you may want to undo the attempted merge. The
+ Undo the merge that you started in
+ Briefly explain how you can tell from the output of
- This section will walk you through the process of resolving the merge conflict. In
- After completing
- If you are not seeing the
+ Ensure that you are on your feature branch. Then issue the command to merge the
+ As you have seen when a merge fails
+
+ The KitClient you are using has been configured so that the
+ The KitClient you are using has configured VS Code's Merge Editor as a mergetool. +
+ +
+ The
+ To open a file in VS Code's Merge Editor: +
+
- The editor window for the
- Match the terms below to the descriptions based upon what is displayed in the editor. -
-- Match the terms below to the descriptions based upon what is displayed in the editor. -
-
- Recall that the merge conflict that you are seeing arose because your feature branch and the upstream
- It is possible to resolve merge conflicts by editing the raw merge information, including removing the chevrons and dividers. However, most development environments, including the one you are using, provide special tools to help with the resolution of merge conflicts. -
-
- The
-
- Match the option you would choose to perform each of the indicated operations.
+ When VS Code's Merge Editor is first opened, it will open a window containing three panes (
- Compare the terms used in the merge tool options to the information displayed in the first and last lines of the merge conflict information.
+
- Click the option that will accept the changes in your feature branch.
+ Open the conflicted file, and click the "Resolve in Merge Editor" (
- Choose the description below that best describes What happens?
+
- Only the changes from the feature branch remain. -
-- Correct. -
-
- Only the changes from the
- Check the editor contents after you click "Accept Current Change". -
-
- The changes from the
- Check the editor contents after you click "Accept Current Change". -
-- The changes from the feature branch and the chevrons remain. -
-- Check the editor contents after you click "Accept Current Change". -
-
- Click "Accept Current Change" and check the editor contents.
+ When VS Code's Merge Editor is first opened, it will open a window containing three panes (
- If you would like to try out the other merge options you can undo your changes by opening the Hamburger menu (☰), clicking on "Edit" and choosing "Undo". -
-- This basic merge tool is helpful for resolving small uncomplicated merge conflicts. Most development environments also provide more advanced merge tools for working with more complex conflicts. The use of those tools is beyond the goals of this chapter. -
-- At this point you have resolved the merge conflict, but the resulting changes have not been committed to your feature branch. In this section you will commit those changes to your feature branch. -
-
- Run the
- Which of the following appear in the output of the
- You have unmerged paths. -
-- Correct. -
-- both modified: README.md -
-- Correct. -
-- no changes added to commit -
-- Correct. -
-- All conflicts fixed -
-- Check the output again. -
-- Your branch is behind 'origin' -
-- Check the output again. -
-
- Run the
- Imagine that after you completed the merge you realize that you didn't merge the changes the way you had intended. Which Git command could you use to undo your merge? -
-
-
- Correct. -
-
-
- Close. Check the output again. -
-
-
- Check the output again. -
-
-
- Check the output again. -
-
- Run the
- Feel free to try out the
- From
- Choose and order the commands that you would use to commit your changes to your local repository. Note: Not all commands will be used.
+ Use the "…" menu in the upper right of the merge tool window and check the "" and "" options as shown in
-
-
-
-
- See
- Run the first command from
- What does
- use "git commit" to conclude merge -
-
- Correct. You already knew that, but its good to know that
- use "git pull" to conclude merge -
-
-
- use "git push" to conclude merge -
-
-
- use "git restore" to conclude merge -
-
-
- Run the
+ Do not make changes until you have your merge tool set up. +
+
- Run the second command from
+ When using the merge tool, you resolve conflicts by modifying the Result pane so that it appears as desired. You can use the point-and-click "Accept ..." and "Remove ..." options provided by the merge tool to move content into or out of the Result pane or you can edit the Result pane directly. +
++ Use the merge tool to resolve the conflict so that the Result contains: +
+ Copy your final merged result here. +
++ Save your changes in the merge tool and close the merge tool window. +
+
+ Then issue a
- What does
- nothing to commit, working tree clean -
-- Correct. -
-- merge complete -
-- True, but that's not the message that is displayed. -
-- changes successfully merged -
-- True, but that's not the message that is displayed -
-
- Run the
+ From
+ Commit the changes you made in resolving the conflict. Be sure to use a meaningful commit message. +
++ Copy the commands that you used and their output. +
+
- From the previous section you know that there is a merge conflict between the upstream
- The process you learned for synchronizing with the upstream in
-
- The exercises in the remainder of this section will help you to synchronize your local and origin
+ The activities in the remainder of this section will have you confirm that you are out of synch with the upstream and that your pull request cannot be merged automatically. It will then have you synch the
+ Like the last activity, you will be working within the KitClient for this activity. +
+
+ Restart your KitClient based on the instructions in
+ Answer the following based on
- To do the synchronization you'll need to have your development environment running. -
-
- Click here to
- Please be patient as this can take a few minutes. When the development environment is ready you will see the message "Kit development environment is ready for use." and your browser window will look similar to the following:
+ Which of the commits (i.e. which colors) in
+ Dark Blue +
+
- Assuming your feature branch is currently the active branch, arrange the the commands below into the order they would be used to synchronize your
-
-
-
-
-
- Review
- Run the commands that you identified in
+ Look at which commits are new in upstream that are not part of the local repository's
+ Visit the main page for your
+ How many commits behind the upstream are you? +
+
+ Now find your pull request in the
+ Does your pull request on GitHub show that it cannot be merged automatically? +
++ If you don't have a merge conflict, you can't do the rest of the exercises in this section. +
++ Briefly explain in a sentence or two of your own words, what happened that made your pull request go from being able to be merged automatically to now not being able to be merged automatically. +
+
+ Think
+ Use what you learned in the prior chapter to synch the
- Let's, confirm that your origin
- Visit your origin repository and ensure that the
+ Check that the
+ Use
- Near the top of the page, you should see a message that is similar to one of the following. Select the message that is most similar to what you see.
+ If the
- This branch is up to date with <the upstream>. -
-- Excellent. Just as it should be. Continue on to the next exercise. -
-- This branch xx commits behind <the upstream>. -
-
- Uh Oh. It doesn't look like your synchronization worked. Try running the commands from
- The exercises in this section provide practice in identifying merge conflicts and resolving them. + The exercises in this section provide practice in identifying merge conflicts and their resolutions.
+
+
- Consider
- The current
-
- Study the program shown in the
- Find the average of a list of numbers. -
-- Correct. -
-- Find the total of a list of numbers. -
-
- Consider the last line in the
- Count how many numbers the user enters. -
-- What does the program do besides count the numbers? -
-- None of these. -
-- One of the other answers is correct. -
-
- When both the feature branch being merged and the
- Select the statement below that best describes a
- A non-conflicting change occurs when a part of the code changes in the feature branch or in the
- Correct. -
-
- A non-conflicting change occurs when a part of the code changes in both the feature branch and the
- Review the definitions of non-conflicting and conflicting changes in the class slides. -
-- A non-conflicting change occurs when the best common ancestor is modified. -
-
- The best common ancestor cannot be changed, all changes are either in the feature branch or the
- A non-conflicting change occurs when part of the feature branch contains only one change. -
-
- You need to consider changes to both the feature branch and the
- Select the statement below that best describes a
- A conflicting change occurs when a part of the code changes in the feature branch or in the
- Review the definitions of non-conflicting and conflicting changes in the class slides. -
-
- A non-conflicting change occurs when a part of the code changes in both the feature branch and the
- Correct. -
-- A conflicting change occurs when the best common ancestor is modified. -
-
- The best common ancestor cannot be changed, all changes are either in the feature branch or the
- A conflicting change occurs when a part of the feature branch contains multiple changes. -
-
- You need to consider changes to both the feature branch and the
+ Merge conflicts occur when both source branches change the same line. +
+
- The questions below will now ask you to identify the non-conflicting and conflicting changes that exist in the merge from
- Highlight (by clicking) all of the lines in the
- Non-conflicting changes occur when a part of the code changes in either the feature branch or the
+ Merge conflicts occur when both source branches change the same line. +
+
- Highlight by clicking all of the lines in the
- Conflicting changes occur when the same part of the code is changed both the feature branch and the
+ Would the feature branch in
- Select the statement below that best describes why the feature branch in
- The feature branch cannot be merged automatically because there is a conflicting change. -
-
- Correct. The last line contains changes in both
- The feature branch can be merged automatically because there all of the changes are non-conflicting. -
-- Are you sure there are no conflicting changes? -
-- The feature branch cannot be merged automatically because there are non-conflicting changes. -
-- Non-conflicting changes can (usually) be merged automatically. -
-- It is not possible to tell if the feature branch can be merged automatically. -
-- If there are conflicting changes then the feature branch will not be able to be merged automatically. -
-
- The feature branch cannot be merged automatically because there are changes both in
- Close. What type of changes prevent automatic merges? -
-
+ Highlight the correct lines that give a Merged Result of the program in
- Use the table below to indicate how the feature branch would be merged into the
- Select all of the non-conflicting changes and choose the conflicting change that ensures that the program will work correctly. -
-
+
+
-
- As in the previous example, the right-hand panel shows commits that the maintainers have merged into the
-
+ Study the program in the
- Study the program in
- Compute the area of a circle. -
-- Correct. -
-- Find the circumference of a circle. -
-
- Close. Notice the use of
- Compute the volume of a sphere. -
-
- Close, but that formula would use
- None of these. -
-- One of the other answers is correct. -
-
- The
+ Highlight (by clicking, or by circling) all of the lines that are non-conflicting changes in the feature branch or the
+ Merge conflicts occur when the feature,
- The questions below will now ask you to identify the non-conflicting and conflicting changes that exist in the merge from
+ Highlight (by clicking, or by circling) all of the lines that are conflicting changes in the feature branch and the
+ Merge conflicts occur when the feature,
- Highlight (by clicking) all of the lines in the
- Non-conflicting changes occur when a part of the code changes in either the feature branch or the
+ Would the feature branch in
- Highlight (by clicking) all of the lines (if any) in the
- Conflicting changes occur when the same part of the code is changed both the feature branch and the
+ Give the Merged Result to show the result of an automatic merge of the feature and
- Select the statement below that best describes why the feature branch in
- The feature branch can be merged automatically because there all of the changes are non-conflicting. -
-- Correct. -
-- The feature branch cannot be merged automatically because there is a conflicting change. -
-- Are there any conflicting changes? -
-- The feature branch cannot be merged automatically because there are non-conflicting changes. -
-- Non-conflicting changes can (usually) be merged automatically. -
-- It is not possible to tell if the feature branch can be merged automatically. -
-- If there are conflicting changes then the feature branch will not be able to be merged automatically. -
-
- The feature branch cannot be merged automatically because there are changes both in
- What type of changes prevent automatic merges? -
-
+ Look carefully at your result in
- Imagine that the non-conflicting changes you identified in
- The merged program will not work correctly because the formula for the area will be incorrect. -
-- Correct. -
-- The merged program will work correctly because automatic merge's are guaranteed to produce a correct program. -
-
- Look closely at the lines that define
- The merged program will not work correctly because an incorrect value of pi will be used. -
-- 3.1415927 is a valid approximation of pi. -
-
- The merged program will work correctly because
- Look closely at how the
+ When a merge can be completed automatically, does it guarantee that the Merged Result will be correct?. +
+
- When both the feature branch and the
- Consider what happened with
- At this point you have resolved the merge conflict and committed the changes to the feature branch in your local repository. What is left is to push that branch to your
- Give the command that will push your modified feature branch to your
-
+ Push your modified feature branch to your
- Thank you. -
-- It looks like you are trying to push to the upstream. Try pushing to your origin instead. -
-
- It looks like you are pushing the
- Review the
-
+ Now visit the upstream repo and find your pull request. You should see that it can now be merged automatically. +
-
+ If your PR cannot be merged automatically you have not correctly resolved the merge conflict; return to
- Use your command from
- Which of the following pieces of information appear in the terminal output from your command? -
-- The URL of your origin repository. -
-- Correct. -
-- The name of the feature branch that you pushed. -
-- Correct. -
-- A bunch of information about "objects". -
-- Correct. -
-- The name of the file that was changed. -
-- Double check the output. -
-- The URL of the upstream repository. -
-- Are you sure it's not your origin repository? -
-- None of these. -
-- Double check the command you used to push your feature branch. -
-- Look closely at the output from your command in the terminal. -
-+ !!Give a screenshot from your pull request showing that it can now be merged automatically. +
+ +- Now that you've resolved the merge conflict and pushed the result to GitHub, it should be possible for the maintainers to automatically merge your pull request. Let's check! + Give the URL of your pull request.
-
- Visit the
- Find and click on your Round2 pull request. -
-- Scroll down toward the bottom of the pull request. -
-- Which of the following messages do you see? -
-- GitHub message indicating that merging can be performed automatically. -
-- Congratulations! You successfully resolved the merge conflict! Please continue to the next exercise. -
-- GitHub message indicating that there are merge conflicts that must be resolved. -
-- Uh oh! Something didn't work. Let's try to fix it. -
- I don't see either of the other messages. -
-- If you see a message about GitHub checking if the merge can be performed automatically, wait a few moments for one of the other messages to appear. -
-
- This topic focuses on how to keep your local and origin repositories synchronized with the project's upstream repo.
+ This topic focused on how to keep your local and origin repositories synchronized with the project’s upstream repo.
In class you saw how changes contributed to the upstream via pull requests can be merged into the
The activities in this chapter will have you synchronize with the upstream.
Synchronizing with the upstream ensures that your local and origin copies of the
-
- Deleting a feature branch is a two step process, first you will delete the feature branch from your local repository. Then you will push that deletion from your local branch to your origin, in order to delete it there as well.
+
- The first step in deleting a feature branch is to delete the feature branch from your local repository. - The exercises in this section will walk you through that process. + The first step is to delete the feature branch from your local repository. + This exercise will walk you through that process.
+ It is not possible to delete the active branch.
+ So, if you have not already, switch from your feature branch to the
+ Which command did you type to list the local branches? +
+
- Git will not allow you to delete the active branch. So typically you will switch to the
- Choose and order the commands below to switch from your feature branch to the
+
-
-
-
-
-
- You will need two commands, the first one to make the
- Run the commands you identified in
+ The
- How can you tell from the output provided that your
-
-
-
-
- It is not possible to tell that
- The output should clearly indicate that
- The command
- Give a command that will delete your feature branch. -
- -- -
-- Thank you. -
-
- Please give the full
- Run your command from
- Which of the following looks most similar to the output you see? -
-- Deleted branch <branch> (was <SHA code here>) -
-- Correct! -
-- error: branch <branch> not found. -
-
- You should not get an error. Return to
- branch deleted -
-- Look at your output again. -
-- there are no active branches -
-- Look at your output again. -
-- Look at your terminal window to see what appears in the output from the command you typed. -
-
+ Refer back to the section on switching branches
+ From the output provided by
- In the previous exercise you deleted your feature branch from your local repository. But you have not yet deleted that feature branch from your origin repository on GitHub. The tasks in this exercise will walk you through that process. -
-
- First, let's confirm that your feature branch still exists in your origin. How can you check if your feature branch exists in your
- Go to the GitHub origin repo and click on the branches button. -
-- Correct! -
-
- Use the
- This command shows the local branches. -
-
- Use the
- This command will delete a local branch -
-- There is no way to check for branches on GitHub. -
-- Take another look at the GitHub interface. -
-- Go to the origin repository on GitHub and look for something that you might use to see which branches exist. -
-
- The Git command
-
- Give a command that will delete your feature branch from your origin repository. -
-- -
-- Thank you. -
-
- Please give the full
- Run your command from
- Which of the following looks most similar to the output you see? + It appears in green.
- [deleted] <branch> -
-- Correct! -
-- error: unable to delete '<branch>': remote ref does not exist -
-- Make sure you entered your feature branch name correctly. -
-- delete completed -
-- Look again at the output provided in the terminal window. -
-- origin updated -
-- Look again at the output provided in the terminal window. -
-+ It appears in bold. +
+
- Examine the output of your
- Use your browser as you did in
+ Refer back to the section on switching branches
+ The command
+ How can you check if your branch was deleted? Be sure to check that it was deleted.
+ If not return to
+ In the previous exercise you deleted your feature branch from your local repository. +
+
+ This feature branch no longer exists in your
+ You have only deleted the feature branch in your local repository. It still exists in your
+ Make sure you look at your repository on GitHub and click the "Branches" link. +
+
+ Explain how you know whether the feature branch exists in your
+ You can delete your feature branch from your origin repo using the git CLI. + The command +
+ +
+
+ will delete the specified branch from the specified remote repository. + Use this command to delete your feature branch from your origin repo. +
+
+ Use your browser as you did in
- Match the tasks on the right with the appropriate Git command listed on the left. -
-- Refer back to the sections in this chapter to see what each command does. -
-- Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter. -
-+ Match the tasks on the right with the appropriate git command listed on the left. +
++ Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter. +
+
You’ve learned a lot about Git and GitHub.
But, to become proficient with these tools takes a lot of repetition and practice.
- The exercises in this section ask you to repeat the process of finding an issue, fixing it and creating a pull request as you did in
- Before you get into the work of fixing a new issue, it will be helpful to review the steps that you'll need to use and they were and how they fit together. + The issue tracker in the upstream FarmData2 repository being used for these tasks.
- The steps you carried out in
- Claim an issue -
-- Create a new feature branch -
-- Switch to the feature branch -
-- Edit the local files -
-- Stage your changes -
-- Commit changes to the feature branch -
-- Push the feature branch to your origin -
-- Make a pull request to the upstream -
-+ 4 +
++ 6 +
++ 35 +
++ 40 +
+- Think about the full process that you worked through from claiming your Round1 issue through making a pull request for your changes. + ADD HINT HERE
+ Clearly there are not enough “Round2” issues for everyone to have their own as was the case with the “Round1” issues. + So, this time there will be multiple people working on the same issue. +
+ ++ Pick one of the “Round2” issues to work on and make a comment on it to indicate your interest in working on it. + Note it is not necessary that the issue be assigned to you this time. + Try to spread out across the issues so that multiple people have commented that they are working on each one. + Give the Issue # and title that you chose. +
++ Now you will go through the process of fixing the issue and making a pull request. + You will use the same process that you used for your “Round1” issue earlier. + That process had a number of steps. + They are listed below in a jumbled-up order, determine the proper order. +
++ Create a new feature branch +
++ Switch to the feature branch +
+- Now it is time to find a new issue to work on. + Edit the local files
-+ Stage your changes +
++ Commit changes to the feature branch +
++ Push the feature branch to your origin +
++ Make a pull request to the upstream +
++ HINT HERE. +
+
+ Use the process that you outlined in
+ Be sure to: +
+ Use a descriptive name for your branch. +
++ Use a meaningful message when committing your changes to the feature branch. +
++ Provide a useful title and description when creating your pull request. +
++ Include a “Closes” or “Fixes” line in your pull request description so that the associated issue number will be closed automatically if your pull request is merged. +
+
- Go to the issue tracker in the upstream FarmData2 repository that you are using for your course.
+ Which of the following Git commands did you use for the steps indicated below.
+ The command references that you created in
- Use the "Labels" dropdown in the issue tracker to filter for issues labeled with the “Round2” tag. + Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter.
+- How many issues have the Round2 tag? + Which of the following would be the best name for a feature branch for issue #37 that adds a link to the NSF award in the Acknowledgements section?
- 4 + issue37
- Correct. + This branch name doesn't provide enough information. + What is issue 37?
- 6 + adding-link
- Be sure you have selected the "Round2" label. + This branch name is too generic.
- 35 + adding-nsf-link-acknowledgement
- Be sure you have selected the "Round2" label. + Correct! This branch name describes the work to be done in the branch.
- 39 + nsf-acknowledgement
- Be sure you have selected the "Round2" label. + This branch name doesn't specify what is being done with regard to the NSF acknowledgement.
- Make sure you have the Round2 tag selected in the "Labels" dropdown. The "Labels" dropdown is between the "Author" and "Projects" dropdowns.
+ Refer back to the section on creating branches
- Clearly there are not enough “Round2” issues for everyone to have their own as was the case with the “Round1” issues. - So, this time there will be multiple people working on the same issue. + Which of the following would be the best commit message for the fix for issue 38 that adds a link to the GNOME Community Engagement Challenge in the acknowledgements? +
++ Added the URL for GNOME to the acknowledgements section of the REAMDE file. +
++ Correct! This commit message briefly but completing describes the change made. +
++ Added URL. +
++ This commit message doesn't provide enough information about the URL added. +
++ Updated README. +
++ This commit message doesn't provide enough information about what has been changed in the README file. +
++ Fixed typo. +
++ This commit message is too generic and does not describe the change for this issue. +
+
+ Refer back to the section on creating branches
+ Give the following information about your pull request.
+ Hint: You can revisit the prior sections to refresh your memory on the terms
- Pick one of the “Round2” issues to work on and make a comment on it to indicate your interest in working on it. - Note it is not necessary that the issue be assigned to you this time. - Try to spread out across the issues so that multiple people have commented that they are working on each one. + The number of your PR
+- Give the number of the issue you chose. + Full URL of your PR
+- + Base Repository URL
- Thank you for selecting a Round2 issue. -
-- Make sure that your issue is labeled as a Round2 issue. -
-
- Now that you have an issue to work on, it is time to fix it. But before you actually start fixing the issue, let's review some of the Git commands and a few other important ideas you'll need to use to carry out the steps from
- Match the Git commands will you use for each of the tasks indicated below. -
-
- The command reference that you created in
- When creating branches you should always use name that describes what is being done in the branch, without being too long. This will help you to remember the purpose of the branch, but not make it onerous to type. -
-- Which of the following would be the best name for a feature branch for issue #37 that adds a link to the NSF award in the Acknowledgements section? -
-- issue37 -
-- This branch name identifies the issue but you would have to remember what that issue is to know what the branch does. -
-- adding-link -
-- This branch sort of describes what is being done, but isn't specific enough to know what the branch really does. -
-- link-nsf-award -
-- Correct. This branch name has enough context to describe what the branch does without being excessively long. -
-- add-link-to-nsf-award-in-acknowledgements-section -
-- This branch name is very descriptive but seems excessively long. Can you imagine typing that over and over again? -
-
- Refer back to
- When writing commit messages for the
- Which of the following would be the best commit message for the fix for issue 38 that adds a link to the GNOME Community Engagement Challenge in the acknowledgements? -
-- Adds the URL for GNOME to the acknowledgements section of the REAMDE.md file. -
-- Correct. This commit message briefly but completing describes the change made. -
-- Added URL. -
-- This commit message doesn't provide enough information about the URL added. -
-- Updated README.md. -
-- This commit message doesn't provide enough information about what has been changed in the README.md file. -
-- Fixed a typo. -
-- This commit message is too generic and does not actually describe the changes that would be committed for this issue. -
-
- Refer back to
- Now that you have fixed the issue and pushed your feature branch, the last thing to do is to make a pull request. -
-- Make a pull request for your feature branch to the upstream repository for your course. + Head Repository URL
+- Enter the full URL of your PR below. + Base Branch
+- + Compare Branch
- Thank you for supplying your pull request URL. -
-- Make sure you have the complete URL of the PR starting with https and ending with the number of your pull request. -
-
- Because there were a limited number of “Round2” issues, other students in your class will have worked on the same Round2 issue as you id. Thus, they will also have made pull requests that contain changes to the same line(s) in the
- Assume for now that the maintainers have not merged any pull requests that fix the Round2 issue that is addressed by your pull request. -
-- Which of the following statements best describes this situation. -
-
- GitHub will indicate that your PR can be merged automatically because it does not contain any conflicts with the upstream
- Correct. While your PR changes the same lines of the
- GitHub will indicate that your PR cannot be merged automatically because it contains a conflict with the upstream
- While your PR changes the same lines of the
- If your PR was the first one submitted for your Round2 issue, GitHub will indicate that it can be merged automatically, otherwise it will indicate that it cannot because there is a conflict with the upstream
- The order in which the PR's are created does not matter. A conflict will only arise after the changes in one of the PRs are merged into the upstream
- GitHub will indicate that your PR can be merged automatically because it does not contain conflicts with any of the other PRs that have been submitted for your Round2 issue. -
-
- Your PR and the others for your Round2 issue change the same lines, so in some sense your PR conflicts with the other PRs. However, none of them have been merged into the upstream
- Visit your PR in the upstream repo and see what GitHub tells you about whether it can be merged or not. -
-- Now assume that the maintainers have merged one of the other pull requests (not yours) that fix your Round2 issue. -
-- Which of the following statements best describes this situation. -
-
- GitHub will indicate that your PR can be merged automatically because it does not contain any conflicts with the upstream
- Your PR will have changed the same lines in
- GitHub will indicate that your PR cannot be merged automatically because it contains a conflict with the upstream
- Correct. A PR for the Round2 issue you were working on has been merged into the upstream
- If your PR for your Round2 issue was submitted before the other one was merged, GitHub will indicate that your PR can be merged automatically. -
-
- The order in which the PR's are created does not matter. GitHub reevaluates whether there is a conflict each time you visit the PR page. Thus, because the other PR was merged, and it changed the same lines in
- GitHub will indicate that your PR cannot be merged automatically because it contain conflicts with all of the other PRs that have been submitted for your Round2 issue. -
-
- Your PR will in some sense contain conflicts with all of the other PRs for the same Round2 issue. However, only the conflict with the upstream
- Visit your PR in the upstream repo and see what GitHub tells you about whether it can be merged or not. -
-+ Because there were a limited number of “Round2” issues, other students will have been simultaneously making changes to fix the same lines in the same files. + Describe in a few sentences how this might create a problem in the future. +
+
- As you saw in
Now, recall that upstream
- Answer the following questions using
- Which action will copy changes from the upstream repository to your local repository? -
-- Pushing to your origin. -
-- The push operation copies changes from your local repository to a remote repository. -
-- Pulling from your origin. -
-- The pull operation copies changes from a remote repository to your local repo. But which remote repo do you need to copy from? -
-- Pushing to the upstream. -
-- The push operation copies changes from your local repository to a remote repository. But, recall that you do not have permission to push to upstream. -
-- Pulling from the upstream . -
-- Correct. Pulling from the upstream copies the changes that have been merged into upstream into your local repository. -
-- Switching to your feature branch. -
-- Switching branches does not move information between your local repository and a remote repository. -
-- Look back to at the figure to see which arrow goes from the upstream to your local repository. -
-- Which action copies changes from your local repository to your origin repository? -
-- Pushing to your origin. -
-- Correct. Pushing to your origin will copy changes from your local repository to your origin repository. -
-- Pulling from your origin. -
-- Pulling copies changes from a remote repository into your local repository. -
-- Pushing to the upstream. -
-
- Pushing copies changes from your local repository to a remote repository. But recall that you do not have permission to push to upstream
- Pulling from the upstream. -
-- Correct. Pulling from the upstream copies changes that have been merged into the upstream to your local repository. -
-- Switching to your feature branch. -
-- Switching branches does not move information between your local repository and a remote repository. -
-- Look back to at the figure to see which arrow goes from your local repository to the origin. -
-
- The next step in getting synchronized with the upstream is to pull the changes to the
-
-
- This section walks you through the process of pulling changes from the upstream
- To pull the changes from the upstream
- Which command can you use to check if
-
- The
-
- The
-
- Correct! The
-
- The
- Refer to
- If your active branch is not
-
- The
-
- The
-
- The
-
- Correct! The
- Refer back to the section in the previous chapter on switching branches
- Use the commands you have identified in the previous tasks to ensure that
- The command
-
+
+ The
+
+ The
+
+ Correct! The
+
+ The
- Give a
-
+ If your active branch in not the
- Correct. -
-
- Please give the full
+
+ The
+
+ The
+
+ The
+
+ Correct! The
+ Refer back to the section in the previous chapter on switching branches
- Run the command from
- It should not contain any error messages.
- If it does, look at the format of the command from
+ will pull any new commits from the specified branch in the remote repo and add them onto the end of the active branch of your local repo.
+ Use the
- Which of the following appear in the output of the
@@ -239,6 +208,7 @@
@@ -246,6 +216,7 @@
@@ -253,6 +224,7 @@
@@ -261,11 +233,13 @@
Make sure you look at all of the lines of output and the color coding of the lines.
- Your local
Recall that you previously used the
-
- Give a
-
+ command to push your feature branch from your local repo to your origin repo.
+ Use the
- Thank you. -
-
- Please give the full
- Run the
- Examine the output from your
+ The URL of your origin on GitHub. +
++ The name of the branch pushed to GitHub. +
++ The URL of the upstream repository on GitHub. +
++ A list of all the files changed in the local repository. +
++ A list of all the branches in the local repository. +
+
- If you don't see information about deltas and objects but see an error message instead, revisit
- The last two lines of the output should contain some recognizable information. What do you think that these lines are telling you? -
-- The URL of your origin on GitHub. -
-- The name of the branch that you pushed to GitHub. -
-- The URL of the upstream repository on GitHub. -
-- A list of all the files changed in the local repository. -
-- A list of all the branches in the local repository. -
-- Only look at the last two lines, the one that starts with "To" and the one that starts with a SHA code. -
-
- As with most things related to Git and GitHub, there are a number of different ways to synchronize.
- For example, you can also fetch the changes from the upstream main to your origin and then pull them from there to your local repository.
- If you are curious, you can check out this GitHub link:
+ As with most things related to Git and GitHub, there are a number of different ways to synchronize.
+ For example, you can also fetch the changes from the upstream main to your origin and then pull them from there to your local repository.
+ If you are curious, you can check out this GitHub link:
If the upstream maintainers decide that the changes in your PR (pull request) are good for the project, they will merge them into the upstream
-
+
+
+ Answer the following questions using
+ Which commits (give the colors) were merged into the upstream
+ Red +
++ Yellow +
++ Green +
++ Blue +
++ Pink +
++ Lime Green +
+
+ Look at which commits are new in upstream that are not part of the local repository's
-
+ Which of the commits did the managers merge from the contributor's pull request? +
++ Red +
+
+ Red was in
+ Yellow +
+
+ Yellow was in
+ Green +
+
+ Green was in
+ Blue +
++ Blue was part of the contributor's feature branch. +
++ Pink +
++ Pink was part of another contributor's pull request. +
++ Lime Green +
++ Lime green was part of another contributor's pull request. +
++ Look at which commits are in the local repository's feature branch. +
+
+ Briefly explain how the pink commit could have gotten into the upstream
- Answer the following questions using
- Which commits (give the colors) were merged into the upstream
- Red -
-- Yellow -
-- Green -
-- Blue -
-- Pink -
-- Lime Green -
-
- Look at which commits are in the upstream
- Which of the commits did the managers merge from the contributor's pull request? -
-- Red -
-
- Red was in
- Yellow -
-
- Yellow was in
- Green -
-
- Green was in
- Blue -
-- Correct. Blue was part of the contributor's feature branch. -
-- Pink -
-- Pink was part of another contributor's pull request. -
-- Lime Green -
-- Lime green was part of another contributor's pull request. -
-- Look at which commits are in the local repository's feature branch. -
-
- Which of the following statements explains how the pink commit might have gotten into the upstream
- The contributor made the pink commit to their feature branch. -
-- The contributor's feature branch did not contain the pink commit. -
-- A maintainer merged the contributor's pull request. -
-- The contributor's pull request contained the blue commit, not the pink commit. -
-- A maintainer merged a pull request from another contributor which contained the pink commit. -
-- Correct. The pink commit was part of a feature branch that another contributor submitted via a pull request. -
-
- The pink commit is not part of the upstream
- The pink commit is part of the upstream
- Look at which commits are in the local repository's feature branch. - This shows the changes made by this contributor. - Other changes were made by other contributors and accepted by the maintainer as a pull request. -
-
+ If you do not see a message that your main branch is behind the upstream
- At this point the upstream
- Use your browser to visit your origin repo on GitHub and ensure that the
- Which of the following messages do you see that indicates that your origin's main branch is behind the upstream
- This branch is x commits behind
- Correct! Being behind means that the upstream
- This branch is x commits ahead of
- Being ahead means that your origin
-
- I do not see either of those messages. -
-
- Seeing no message indicates that origin
-
- You can find the relevant message in a box just below the branch name drop down near the top left of your origin's GitHub page. -
-
- Which of the following statements describes what could have happened to cause your origin's
- Another contributor has made a pull request to the upstream for changes that they have made. -
-
- In order for this to affect the upstream
- You have made a pull request to the upstream for a feature branch on which you have been working. -
-
- In order for this to affect the upstream
- You have committed changes to your local
- Here your origin
- A maintainer merged a pull request and you have not yet updated your origin's
- Correct. The manager merging the pull request will add changes to the upstream
- Think about how changes may been added to the upstream
- Before you will be able to pull changes from the upstream you will need to tell your local repository where the upstream is.
- In earlier figures (e.g.
- In
+ Like the last activity, you will be working within the KitClient for this activity. +
+ +
+ Restart your KitClient based on the instructions in
- Like prior chapters, you will be working within your development environment for this activity. -
+
- Click here to
+ How is the origin remote indicated in
- A
- A
- The
- Be sure that you are in the directory containing your local repository and run the
- Examine the output of the
- Where does the URL for the origin remote point? + It is labeled as "origin".
- It points to the GitKit FarmData2 repository that your instructor created for the course. -
-- The repository that your instructor create is serving as the upstream repository. -
-- It points to your copy of the GitKit FarmData2 repository that you forked from the upstream. -
-- Correct! The origin is your fork that is contained in your GitHub space. -
-- It points to the repository for the live FarmData2 project. -
-- That repository would be the upstream if you were working on the live project. -
-- Look at the part of the origin remote's URL that comes after `github.com`. This part indicates where on GitHub the repository is located. Is it in your GitHub space? + Correct! The diagram shows your origin remote on the top left side with the label "origin".
-
- What in
- The dotted orange arrow on the left that points from your local repository to the origin. -
-- Correct. -
-- The dotted orange arrow at the top that points from your origin repository to the upstream. -
-- The arrow at the top represents a Git remote associated with your origin repository, not your local repository. -
-- The blue cylinder at the top left of the figure. -
-- The blue cylinders represent remote repositories. This question is asking about the Git remote. -
-- Look at the diagram again. The origin Git remote will be associated with your local repo and will indicate where the origin repository is located. + It is labeled as "local".
- -
- Notice that the output from the
- The exercises in this section will walk you through the process of setting the upstream remote. -
-- Use your browser to navigate to the GitHub page for the upstream Gitkit FarmData2 repo that you are using for this course. Hint: You can find the GitHub page for the upstream using the "forked from:" link at the top of the GitHub page for your origin repository. -
++ It is labeled as "feature branch". +
+
- Once you find the GitHub page for the upstream, you can get its URL by clicking the “Code” button and using the "Local" tab. This URL will end in
- Enter the URL of the upstream GitKit FarmData2 you are using for your course below.
+ Confirm that
-
+ To create a new remote that tells your local repo about the upstream you will need the URL of the upstream repo.
+ Use your browser to navigate to the upstream FarmData2 repo that you are using for this course and give its URL here.
+ Hint: You can find the
- Looks good! But just to be sure, double check that this URL agrees with the one you gave in
- Be sure you are copying the URL of the upstream for your class as given by your instructor. -
-
- The
- The format for this command is:
- Give a command that will create a new Git remote named upstream that points to the GitKit FarmData2 upstream repository that you are using for this course.
+ Use the above command to create a remote named
-
+ Use the
- Looks good! But just to be sure, double check that the URL you used agrees with the one you gave in
- Double check the format of your command and the URL that you are using. -
-
- Use the
- Two lines beginning with origin and giving the URL of the upstream repository. -
-
- The lines beginning with
- Two lines beginning with upstream and giving the URL of the upstream repository. -
-- Correct! The URL of the upstream is where you will be pulling changes from. -
-- One of the above answers is correct. -
-- Think about the different between origin vs. - upstream. -
-
- You just added the upstream Git remote to your local repository. How is this Git remote represented in
- The dotted orange arrow on the right that points from your local repository to the upstream. -
-- Correct. -
-- The dotted orange arrow on the left that points from your local repository to the origin. -
-- The arrow on the left represents the origin Git remote. -
-- The dotted orange arrow at the top that points from your origin repository to the upstream. -
-- The arrow at the top represents a Git remote associated with your origin repository, not your local repository. -
-- The blue cylinder at the top right of the figure. -
-- The blue cylinders represent remote repositories. This question is asking about the Git remote. -
-- Look at the diagram again. The upstream Git remote will be associated with your local repo and will indicate where the upstream repository is located. -
-- Note that you will only need to set the upstream remote once for a repository. - Once the upstream remote is set you will be able to pull from the upstream repo as often as is necessary. -
-+ It is labeled as "origin". +
++ It is labeled as "upstream". +
++ Correct! The diagram shows your upstream remote on the top right side with the label "upstream". +
++ It is labeled as "local". +
++ It is labeled as "feature branch". +
+
+ When you issued the
+ The upstream remote provides your local repo with the information it needs to find the upstream repo.
+ In git this information is represented using a URL.
+ How is this information represented in
+ It is labeled as "origin". +
++ It is labeled as "upstream". +
++ Correct! The diagram shows your upstream remote on the top right side with the label "upstream". +
++ It is labeled as "local". +
++ It is labeled as "feature branch". +
+
+ When you issued the
- Commit messages should be as specific as possible regarding the changes made. - Something like "fix typo" is too generic as it can apply to lots of different changes. -
-- Commit messages should be as specific as possible regarding the changes made. - Which of the messages provides information about what is added and where? -
-
The
- Write a
- -
-- Thank you. - Your command is in the proper format, please make sure the commit message is meaningful. -
-- Double check the format of your command. -
-
- Use the
+ Provide the command you entered. +
+- Look at the output produced. -
-- It shows the name of the file changed in the square brackets [ ]. -
-- The first part of the first line is not the file name, take another look at the output. -
-- It shows the name of the feature branch that contains the change in the square brackets [ ]. -
-- The first part of the first line is the feature branch name. -
-- It shows the SHA code of the commit in the square brackets [ ]. -
-- The second part of the first line is the SHA code of the commit. -
-- It shows the commit message. -
-- The last part of the first line is the commit message. -
-- It shows the number of files changed. -
-- The first part of the second line is the number of files changed. -
-- It shows the number of lines inserted. -
-- The second part of the second line is the number of lines inserted. -
-- It shows every line that was inserted and/or deleted. -
-- The output should not show the individual line changes, rather a summary of the changes. -
-- There should be two lines of output. - The first will provide 3 different pieces of information. - The second provides what additional information? -
-
Now use the
- You have staged and committed all modified files. -
-How do you know your changes have been committed?
- The
- The
- The
- The
- There should be no modified files that are still staged and the
Use the
- The top commit shown is your latest commit. -
-- The bottom commit shown is your latest commit. -
-- Your commit is not shown. -
-- Feedback 3 -
-- The log shows the latest commits first. -
-
-
-
-
- Correct! -
-- To change the active branch you need to switch to it. -
-
The output of the
- What branch are you on, the
- The commit is not shown in the
- You are on the
- Correct! -
-
- You are on the feature branch and the commit is on the
- You should be on the
- The
- The
- It only shows the first commit made, not every commit. -
-
- The
- Commits are specific to branches. - You must be on the proper branch to see a commit. -
-
-
-
- The
- If you want to create a new feature branch named fixTypoInName, which command should you use? + What part of the output tells you which branch is currently active in your repository?
-
- Correct! + Correct! The first line specifies the current branch.
-
- The command should not contain < >. + The second line specifies the origin branch not the active branch.
-
- The command is missing
-
- The command is missing
- Look back at the format of the command in the previous description.
+ Look at the first line of the output from the
- Adapt the command from
- What output was produced when you typed the
- No output was provided. -
-- Correct! -
-- It said the branch was created. -
-- Look at the terminal window again. -
-- It gave an error statement. -
-- Your branch was not created. - Make sure your branch name does not contain spaces and < > -
-- The current branch is <branch name>. -
-- Look at the terminal window again. -
-- Look back at the format of the command and make sure you type it correctly. + Your output should contain the text “nothing to commit, working tree clean.” What do you think it means that you have “nothing to commit.” Hint: when would you have something to commit? This is the opposite of that!
-
- The
- Type
+ Create a new feature branch with a descriptive name that you will use to fix the issue that you claimed. + Remember not to include the < > when writing your own command. + Type the command you entered below. +
-
- Correct! -
-
-
- Correct! -
-
-
-
-
+ Use the
+ Creating a new branch with the
- The branch name should not have < >. -
-
+
- If you don't see your branch name it means it was not created.
- Try creating it again using the format of the command from
- By looking at the output provided by
- It will have an * before the branch name. -
-- Correct! -
-- The branch name will appear in green. -
-- Correct! -
-- The branch name will appear in italics. -
-- Look at the output provided in the terminal window again. -
-- The branch name will appear in bold. -
-- Look at the output provided in the terminal window again. -
-- There are two ways the active branch is indicated. -
-
- Refer back to
+
+ Copy the URLs from the gray bar into the textboxes below. +
++ Base Repository +
++ Head Repository +
+
- The terms “Base Repository” and “Head Repository” are generic labels that GitHub uses for the two repositories that are involved in the pull request.
+ The terms “Base Repository” and “Head Repository” in
The base is where you want your changes merged into. - The compare is where your changes are being pulled from. + The head is where your changes are being pulled from.
- The #123 part of the line should automatically become a link to the issue. + The #123 part of the line should automatically become a link to the ticket. If it does not, check to be sure you have entered the information exactly as shown above.
@@ -189,7 +219,7 @@
- Check the status of your PR and confirm that it can be merged automatically.
+ Check that status of your PR and confirm that it can be merged automatically.
The status will be listed at the top of the GitHub page below the image from
+ -
- The upstream repository is the repository you forked from. - Double check that you aren't in your origin repository. -
-- In GitHub look at the top left side of the browser window. - If it says "forked from" with a link it means you are in your fork instead of the upstream repository. - Click that link to go to the upstream repository. -
-On your pull request page there will be “Files Changed” tab:
@@ -277,8 +289,13 @@ It also indicates the changes you have made. The project maintainers will often use this diff to see the details of what you have changed. +- Which of the following describes how the diff indicates the changes that you made? + Briefly describe how the diff indicates the changes that you made.
- Correct! You can see the changes by comparing the red and green lines. -
-- The red only shows what is being deleted. -
-- The green only shows what is being inserted. -
-- GitHub doesn't use strike through to indicate changes. -
-- The diff command will color code the changes. - Lines that are changed will show both the original line and the updated line. -
-In the last two sections you created a feature branch and switched to that branch. In this section you will edit your local files to fix the issue that you claimed in the issue tracker. - Confirm you are on your feature branch now.
@@ -20,80 +19,42 @@- Provide the URL to the issue that you claimed in the issue tracker. + Provide a link to the issue that you claimed in the issue tracker.
-
- Thank you. -
-- Make sure you have pasted the complete URL starting with https and ending with the issue number. -
-Read the issue that you claimed. - To make the requested change you will need to open the file. - Click <Code> to see the files in the repository. - Use the issue to locate the file. - Once you have found it, click on it to open it.
- In which file will you be making changes to address your issue? Hint: Look at the text of your issue in the issue tracker. - Be careful to use the same capitalization as given in the issue. -
-- -
-- Thank you. -
-+ In which file will you be making changes to address your issue? Hint: Look at the text of your issue in the issue tracker. +
+- Double check the spelling of the file name, that the name is ALL CAPS, the .md at the end of the file name is included and in lower case. -
-
- Use a text editor to modify the file you identified in
- Find the file in the Explorer pane to the left. This should show you the list of all the files and folders in the project. If you do not see the list of files and folders, click on the icon that looks like one sheet of paper on top of another. -
-- Open the file in the editor and make the changes in the issue you claimed. -
-- Your changes should be automatically saved. -
-
+ Use a text editor to modify the file you identified in
@@ -119,24 +80,20 @@
- If you see the message "nothing to commit, working tree clean", it means that your edits in the previous exercise were not saved.
+ What does the output tell you about the current status of the repository? If you see the message "nothing to commit, working tree clean", it means that your edits in the previous exercise were not saved.
Go back and save your edits and then issue the
How many files are not staged?
@@ -168,7 +125,7 @@- Correct! The file you changed has been modified but not staged yet. + Correct! The file you changes has been modified but not staged yet.
- How many files will be committed? + How many files are added to the commit?
- Unless you already issued the
The
- How is the change that you made indicated in the output from
+ How is the change that you made indicated in the output from
- The new text is in red, the old text is in green. -
-- Look again to see what color your change appears in. -
-- The new text is in green, the old text is in red. -
-- Correct! The original text is in red, your changes are in green. -
-- Only the new text appears. -
-- Look again, you should see the original text as well. -
-- The old text appears with a strike-through line across it. -
-- Strike-through is not part of the feedback git commands can provide. -
-- Look at the feedback again and look for your change. - Do you also see the original text? -
-+ The new text is in red, the old text is in green. +
++ Look again to see what color your change appears in. +
++ The new text is in green, the old text is in red. +
++ Correct! The original text is in red, your changes are in green. +
++ Only the new text appears. +
++ Look again, you should see the original text as well. +
++ The old text appears with a strike-through line across it. +
++ Strike-through is not part of the feedback git commands can provide. +
++ Look at the feedback again and look for your change. + Do you also see the original text? +
+- Like in the previous chapter, you will be working within the development environment for this exercise. -
- -
-
-
- Let's explore this state just a little before making the changes that address the issue that you have claimed. -
- -
-
+
+
-
-+ Let's explore this state just a little before making the changes that address the issue that you have claimed. +
-
- Click here to
+
- The
- Which of the following commands will provide the four most recent commits? -
-
-
- This will provide information about the 10 most recent commits, not just the first four. -
-
-
- This is not the proper format, a symbol is missing before the 4. -
-
-
- Correct! -
-
-
- The symbol before the 4 is incorrect. -
-
- Refer back to the beginning of this subsection for specifics about the
- Ensure that you are in your cloned repo (i.e.
- the GitKit-FarmData2 directory is your working directory).
- Then use the
- A line that begins with "commit" appears at the start of the information about each commit.
- That line also contains a long string of numbers and letters.
- That string is called the
+ The
- Paste the output of the
+ Ensure that you are in your cloned repo (i.e.
+ the GitKit-FarmData2 directory is your working directory).
+ Then use the
+ A line that begins with "commit" appears at the start of the information about each commit.
+ That line also contains a long string of numbers and letters.
+ That string is called the
+ Use the output from the
- Use the output from the
@@ -257,13 +138,11 @@
- Look at the dates of each commit.
- The SHA code appears above the author of the commit and date the commit was made.
+ Look at the dates of each commit. The SHA code appears above the author of the commit and date the commit was made.
@@ -271,7 +150,6 @@
- There is a more recent commit. + There is a more recent commit.
@@ -345,7 +222,6 @@
- What is the purpose of the most recent commit by Elad Sheskin (username: shes-dev)? + What is the purpose of the most recent commit by shes-dev?
- The
- What part of the output tells you which branch is currently active in your repository? -
-- The branch name is displayed in the first line after "On branch". -
-- Correct! The first line specifies the current branch. -
-- The branch name is displayed at the end of the second line. - It is "origin/main". -
-- The second line specifies the origin branch not the active branch. -
-- The branch name is not displayed in the output from this git command. -
-- Look again, the active branch is listed. -
-- The branch name is displayed at the end of the last line. - It is "working tree". -
-- The last line indicates if there are changes to commit. -
-
- Look at the first line of the output from the
- Your output should contain the text “Your branch is up to date with 'origin/main'.” What do you think it means that your branch is “up to date”? -
-
- It means that your branch contains all of the commits in the origin
- Correct! -
-
- It means that the origin
- Think about what is being compared in that statement. -
-
- It means that your branch contains all of the issues in the origin
- Issues are not part of a branch. -
-
- It means that the origin
- Issues are not part of a branch. -
-
- Think about what could be "out of date".
- What differences might there be between the origin
- Your output should contain the text “nothing to commit, working tree clean.” What do you think it means that you have “nothing to commit.” -
-- It means that you haven't made any changes. -
-- Correct! -
-- It means that you haven't created any issues. -
-- Issues aren't part of a branch. -
-- It means you haven't made any branches. -
-- Branches aren't committed. -
-
- It means the origin
- This statement is referring to your local branch, not origin
- When would you have something to commit? This is the opposite of that! -
-- In the next section you will create a feature branch. -
-- Note that the tasks listed are in approximately the same order as they appear in the sections of this chapter. -
-- Match the tasks on the right with the appropriate git command listed on the left. -
-
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-pushing-a-branch-to-your-origin.ptx b/source/ch-upstreaming-changes/sec-pushing-a-branch-to-your-origin.ptx
index d4009d7..4d2e46c 100644
--- a/source/ch-upstreaming-changes/sec-pushing-a-branch-to-your-origin.ptx
+++ b/source/ch-upstreaming-changes/sec-pushing-a-branch-to-your-origin.ptx
@@ -31,15 +31,13 @@
- The
How many branches are in your local repository?
Look again, you should see more than just the
- 1 - feature branch that you created in
- Look again, you should see more than just the feature branch.
+ Look again, you should see more than just the
- 2 -
- Correct! Your local repository will have both the
- If you have more than 2 branches perhaps you created a feature branch multiple times by accident. + If you have more than 2 branches perhaps you created a feature branch multiple times by accident.
Correct! There is only 1 branch,
- 1 - feature branch that you created in
- Look again, your feature branch should not be listed in GitHub as it is only in your local repository.
+ Look again, your
- 2 -
- Look again, your feature branch should not be listed in GitHub as it is only in your local repository.
+ Look again, your
3 or more with differing branch names
- Perhaps you aren't in your origin repository. - Make sure you see your GitHub userid in the upper left hand corner of your GitHub tab. + Perhaps you aren't in your origin repository. Make sure you see your GitHub userid in the upper left hand corner of your GitHub tab.
- Make sure you are in your origin repository, not the upstream repository.
- Refer to
+
- You created a branch in your local repository but it does not appear in the origin repository yet. -
-- Correct! -
-- You created a branch in the origin repository but it does not appear in your local repository. -
-- Your branch is in your local repository, not the origin repository. -
-
+ Before you will be able to push your feature branch to GitHub you will have to get a
- Someone else created a branch in the origin repository. -
-+ When interacting with GitHub using the git CLI (e.g. + when pushing a branch), GitHub requires that you use a PAT for authentication instead of your password. +
-- Branches are created in the local repository. - It is possible that someone else created a branch in their local repository and pushed it to their origin. - You have a different origin repository so you would not see it. -
-
+ Follow GitHub's instructions for creating a (classic) personal access token:
+ When doing so be sure to: +
- Someone else created a branch in their local repository and it appears in the origin repository. + Choose “repo” for the “scopes and permissions.”
-- It is possible that someone else created a branch in their local repository and pushed it to their origin. - You have a different origin repository so you would not see it. + Be sure to copy and paste your PAT somewhere safe – maybe e-mail it to yourself. + You will not be able to retrieve it again after you leave the page.
-- All the work you have done in this chapter is on your local machine. - What should be appearing in your local repository that is not in the origin repository? -
-
+ Note: Typing or even copy and pasting your PAT every time it is needed can be a hassle.
+ To help, the git CLI provides what is known as the
- The
- You will need to push your feature branch from your local repository to your origin repository on GitHub.
- You have given your remote repository the name
- The output should not contain any error messages. - If you see error messages, make sure you spelled your branch name correctly and your command is in the proper format and does not include < >. - The last few lines should also give you some indication that your push was successful. - Look at the last two lines of output produced. + Note: You can use the name of the remote repository, so you do not need to use the full URL. + You will also need to paste your PAT as the password when it is requested. The cursor will not move when you put in the PAT nor will you see any characters. After you type or paste it hit Enter
-- The second to last line is the URL of the origin repository. -
-- Correct! -
-- The last line provides the name of the branch in the local repository that was pushed to the origin repository. -
-- Correct! -
-- The second to last line is the URL of your local repository. -
-- Your local repository does not have a URL, it is on your local machine. -
-- The last line provides the URL of the branch in the local repository that was pushed to the origin repository. -
-- This shows the name of the branch, not a URL. -
-
- There are several lines of output that mention deltas.
- Ignore these.
- Make sure you are looking at the last two lines - the first of which begin with To and the second of which begins with a hexademical code.
+ The output from
- Visit your origin repository on GitHub and check that the branch was pushed.
- You may have to reload the page.
+ The
- How can you tell your branch was pushed? + Use a command that will push your feature branch from your local repo to your origin repo on GitHub.
-- The number next to the Branches link is now 2. -
-- Correct! The number of branches should have increased. -
-
- When I click on Branches my branch is now listed in addition to
- Correct! You should be able to see both branches on this page. -
-- The number of issues has increased. -
-- Pushing a branch will not create an issues. -
-- The number of pull requests has increased. -
-+ Note: You can use the name of the remote repo, so you do not need to use the full URL. +
+ +- Pushing a branch will not create a pull request. -
-
+ When you attempted to push in
- There are multiple ways you can tell that your branch has been pushed by looking at the origin repository on GitHub. + If you get the same pop up, open it again. + Look for the GitHub authorization. + Click the "..." menu next to it and edit it. + Ensure that "repo" with read/write permissions are set and save it. + It will send you to GitHub to complete the authorization. + When done, return to your GitPod workspace and try the push again. + It should work.
-- The exercises in this section will walk you through staging the changes you made to your Local Files. -
- -
- The
- Write a
+ The
- Enter the command you wrote below.
-
-
-
- Thank you. -
-- Are you sure that is the file that the issue asked you to edit? -
-- Check your issue again to see which file you should have edited. + Provide the command you entered.
-
- Now run the
- Compare your output in
@@ -105,7 +88,7 @@
- Correct! After issuing the
- Did you change more than 1 file by accident? Verify that you only changed the file specified in your issue.
+ Once you have issued the
- Staged means a file has been modified and will be added to the commit.
+ Staged means a file has been modified and added to the commit.
How many files are listed as ready to be committed?
@@ -228,98 +212,10 @@
- Staged means a file has been modified and will be added to the commit.
+ Staged means a file has been modified and added to the commit.
- Run the
- No output is produced. -
-- Correct! There are no differences because your changes were staged. -
-- It shows the file name that I changed. -
-
- If you are seeing the file name you changed it means either you made additional changes after the
- It shows the code I added in green. -
-
- If you are seeing code changes it means either you made additional changes after the
- It shows the code I deleted in red. -
-
- If you are seeing code changes it means either you made additional changes after the
- The
- The
- Note that git also has a
- Figure
-
- As you saw in
- Type
- Switched to branch '<name>' -
-- Correct! -
-- Switched to branch 'main' -
-
- You were on
- error: Your local changes to the following files would be overwritten by checkout: ... -
- -- Aborting -
-
+ Use the
- You should not have made any changes so far. -
-
+ Figure
+
- fatal: invlalid reference: <name> -
-
+ You can also switch branches using the
- You probably typed the branch name incorrectly.
- Run
- Make sure you don't include < > in your
- Which of the following commands could be used to confirm that your feature branch is now the active branch?
+
-
- Correct! -
-
-
- Correct! -
-
-
-
-
- When
- There are two commands that will provide information about the active branch.
+ How do you know that
- Which of the following commands could be used to make
+ Enter a
-
- Correct! -
-
-
- This will try to create a new branch named
-
-
-
-
- Refer back to how you made your feature branch the active branch. + How do you know that your feature branch is the active branch?
-
- Type the command from
- Assuming you are on the main branch, drag the steps that will make your feature branch the active branch and verify you are on your feature branch. - Some steps may not be used. -
-
-
-
-
-
-
- Think about how you make a branch active and then verify it. -
-
- Use the commands from