22.6. Exercises: Git

22.6.1. Working in a Local Repository

We will use our new terminal powers to move through the Git exercises.

  1. In whichever directory you are keeping your coursework, make a new directory called Git-Exercises using the mkdir command.
  2. Inside the Git-Exercises directory, initialize a new Git respository using git init.
  3. Add a file called exercises.txt using the touch command in the terminal.
  4. Commit your local changes using the git commit procedures.
  5. Add "Hello World!" to the file called exercises.txt.
  6. Commit your local changes following the same steps to you used for step 4.
  7. View and screenshot the result when you use git log. Make note of what you see!

22.6.2. Setting up a Github Account

For our remote repositories, we will be using Github.

To create your account, follow these steps:

  1. Navigate to Github's site using the link above.
  2. Sign up for an account on the homepage either by filling out the form or clicking the "Sign Up" button.
  3. Once you have an account, you are ready to store your remote work.