Skip to main content

GitKit (VSCode Edition): Learn git and GitHub in Context

Section 3.1 Exploring Your Local Repository

Like in the previous chapter, you will be working within the KitClient for this exercise.
Current State:
Figure 3.1.1 shows where you should be based upon the exercises in the previous chapter. You will have forked the upstream FarmData2 repository into your own GitHub account. You will then have cloned your fork into a local repository on your computer. Your local files at this point are a copy that reflects the current state of the upstream main branch.
Let’s explore this state just a little before making the changes that address the issue that you have claimed.
Cloud image of fork, clone, and local files.
Figure 3.1.1. Fork, Clone and Local Files.

Exercises

The git log command provides a way to see information about the history of the project. It will display information about the most recent commits that have been made to the repository. By default, git log displays information about the 10 most recent commits. You can append a -2 (or -5) to show only the most recent 2 (or 5) commits.

2.

Ensure that you are in your cloned repo (i.e. the GitKit-FarmData2 directory is your working directory). Then use the git log command to display the information about the 4 most recent commits. (If you don’t see more all four recent commits, press "return" or "spacebar" to see more; when you are done, press "q" to quit.)
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 SHA (secure hashing algorithm) hash. It is a string of digits (0-9) and letters (a-f) known as a hexadecimal number and it provides a unique identifier for the commit. Following the SHA hash is information about the author, the date the commit was made and the commit message that was used to describe the changes.
Use the output from the git log command to answer the following questions about the project history. Note, if you have started this exercise late, new commits may have been added. If so, you will need to look at more than the 5 most recent commits to answer the question.
(a)
    What is the SHA of the most recent commit by IrisSC?
  • f7330b62bf421c4a87830fee758105a790f6b6ba
  • That commit was not made by IrisSC.
  • d622e8d6d71e27890c73e2428e6dcf9d44ca606e
  • That commit was not made by IrisSC.
  • 80b4408aa0df6dadc4e5e2c310a5e5cbbc0b9d35
  • Correct!
  • 73feb3808ae8978deaddfeb9eb14ef6d99457d18
  • That commit was made by IrisSC, but it is not her most recent commit.
Hint.
Look at the dates of each commit. The SHA code appears above the author of the commit and date the commit was made.
(b)
    What is the date of the most recent commit to the repository?
  • Oct 11 2021
  • There is a more recent commit.
  • None of those listed.
  • Correct! The most recent commit is always shown first in the list.
  • Oct 8 2021
  • There is a more recent commit.
  • Oct 5, 2021
  • There is a more recent commit.
Hint.
To see the most recent commit you can scroll up in the terminal window or type the log command again.
(c)
    Who authored a commit on October 11, 2021?
  • Batese2001
  • Correct! Bates2001 authored a commit on October 11, 2021.
  • kit
  • kit did not author a commit on October 11, 2021.
  • IrisSC
  • IrisSC did not author a commit on October 11, 2021.
  • Grant Braught
  • Grant Braught did not author a commit on October 11, 2021.
Hint.
The author’s name will appear below the SHA and above the date of the commit.
(d)
    What is the purpose of the most recent commit by shes-dev?
  • Updated comment (#288)
  • Correct! shes-dev made this commit on October 5, 2021.
  • chore: install kit
  • This commit was not made by shes-dev.
  • Reorder Seeding Input (#281)
  • This commit was not made by shes-dev.
  • Summary Table Timing and No Log Messages (#289)
  • This commit was not made by shes-dev.
  • No Default Label For Drop Down Component (#293)
  • This commit was not made by shes-dev.
Hint.
This commit is older than the others, try a git log command that shows a few more commits.
You have attempted of activities on this page.