Skip to content

Instantly share code, notes, and snippets.

@vanderhoop
Last active August 29, 2015 14:10
Show Gist options
  • Select an option

  • Save vanderhoop/765187234b26f219b63a to your computer and use it in GitHub Desktop.

Select an option

Save vanderhoop/765187234b26f219b63a to your computer and use it in GitHub Desktop.

Lohan on the Straight and Narrow

Becoming comfortable with Git takes time and constant repetition. Thus, it's important that you get as many reps with the basics as possible. Read on.

Exercise Objectives

  • gain muscle memory for adding and committing changes to a Git repository

Directions

  1. Add a new item to the lindsay_lohan.txt file.
  • Suggested format: "YEAR - starred in MOVIE_TITLE with SOME_ACTOR"
  1. Add the file to the staging area and commit it with a present tense commit message
  2. Add another new item to the timeline.
  • Suggested format: "YEAR - began dating SOME_RENOWNED_PHILANTHROPIST"
  1. Add the file to the staging area and commit it with a present tense commit message
  2. Add a final item to the timeline.
  • Suggested format: "YEAR - establishes FICTIONAL_CHARITABLE_ORGANIZATION with her sister and FORMERLY_TROUBLED_POP_STAR"
  1. Add the file to the staging area and commit it with a present tense commit message

Code Snippets

  • git add FILE_NAME
    • adds a file called FILE_NAME to the staging area
  • git add .
    • adds all files in the current directory to the staging area
  • git commit -m "updates comments"
    • creates a snapshot of the repo at the time of commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment