Skip to main content

Section 4.5 Summary

While the project in Section 4.6 is a test of your abilities, it is not a “traditional” test. I don’t expect you to have memorized all of the content of the previous chapter. That will come with time. The process of cloning a repository and editing, staging, committing, and pushing files is something you will repeat over and over again as you work through projects. For right now, please go back to the previous sections if you forget how to do something! For your convenience, a summary of the Git process is provided here. Utilize this summary for the project and for your future endeavors. There is no shame in looking something up to make sure you’re doing it right, espeically with Git.
What follows is an ordered list of the steps in the Git process when working alone.
  1. Create a repository on GitHub. (You can also do this with Git, see Karl Broman’s guide 51 . I prefer starting with GitHub, however.) See Subsection 3.2.1.
  2. Clone the repo to your local computer with git clone. See Subsection 4.1.1 and Git Procedure 4.2.
  3. Create an appropriately-named branch with git branch and git switch or with git switch -c. See Subsection 4.1.2 and Git Procedure 4.3.
  4. Edit/create/delete files as you please. See Section 4.2
  5. Follow the three step process as described in Section 4.3. Don’t forget about the usefulness of git status throughout (Subsection 4.3.1)!
    1. Stage your files with git add. See Subsection 4.3.2 and Git Procedure 4.5.
    2. Commit your files with git commit -m. See Subsection 4.3.3 and Git Procedure 4.6.
    3. Push your files back to GitHub (on your current branch) with git push origin. See Subsection 4.3.4 and Git Procedure 4.7.
  6. Create a pull request on GitHub and merge your changes into main. See Activity 4.9.
  7. Go back to your local repo, switch to main with git switch main and pull in your changes with git pull. See Git Procedure 4.10.