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.
- 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.
- Create an appropriately-named branch with
git branch
andgit switch
or withgit switch -c
. See Subsection 4.1.2 and Git Procedure 4.3. - Edit/create/delete files as you please. See Section 4.2
- 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)!- Push your files back to GitHub (on your current branch) with
git push origin
. See Subsection 4.3.4 and Git Procedure 4.7.
- Create a pull request on GitHub and merge your changes into
main
. See Activity 4.9. - Go back to your local repo, switch to
main
withgit switch main
and pull in your changes withgit pull
. See Git Procedure 4.10.