Skip to main content

GitKit (Linux Desktop Edition): Learn git and GitHub in Context

Section 4.3 Creating and Verifying the Upstream Remote

Like the last activity, you will be working within the KitClient for this activity.

Exercises

2.

(a)
The git remote -v command lists the names and URLs of all of the remote repositories (or just remotes for short) that your local repo knows about. Run this command in the directory that contains your local repository.
(b)
    How is the origin remote indicated in Task 4.3.2.a represented in Figure 4.1.1?
  • It is labeled as "origin".
  • Correct! The diagram shows your origin remote on the top left side with the label "origin".
  • It is labeled as "upstream".
  • It is labeled as "local".
  • It is labeled as "feature branch".
Hint.
When you issued the git remote -v command pay attention to the name given to the fetch and pull URLs.
(c)
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 upstream using the link from your origin repo in GitHub. Once you find the upstream, you can get the URL by using the “Code” button in the upstream repo, it ends in .git.
(d)
The git remote command can also be used to add a new remote to your local repo. The format for this command is:
git remote add <remote repo name> <remote repo URL>
Use the above command to create a remote named upstream that points to the FarmData2 upstream repository that you are using for this exercise.
(e)
Use the git remote -v command to confirm that the new upstream remote has been added.
(f)
    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 Figure 4.1.1?
  • 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".
Hint.
When you issued the git remote -v command pay attention to the name given to second set of fetch and pull URLs.
You have attempted of activities on this page.