Practing Git on Your Computer

Practice Git

Set up a new repository and practice committing

  1. make a new folder
  2. navigate into the folder
  3. initialize a git repository
  4. make a new document
  5. commit the new document
  6. Add a new document, and/or create a change to the existing document
  7. Make a new commit

Undo changes

  1. make a change. Don't add or commit it yet, but reset to the previous commit
  2. check to verify the change is gone
  3. make another change, and commit it this time.
  4. reset the project back to the next most recent commit
  5. verify the state of your project (in other words, the file and/or directories you changed) is back to the earlier commit.

Need Help?

See resources, or go back to Moodle to post to the forum, email us, or visit office hours. Or, of course, google it.

That was too easy. I want to do more

Create a .gitignore file that ignores images (or a directory of your choice). Test that it's working by adding an image (or something to an ignored directory) and then running git status. If it works, git should not notice a change.