Lesson 9 of 26
In Progress

Commit History

Your Turn
  1. Add some additional text to your README.md
  2. Commit your changes (make sure to stage your README.md file and add a commit message)
  3. View the history of your repository
  4. Make sure you understand the commit history (top section) and the diff (bottom section)
  5. View your README.md at a previous commit by clicking on “View file …”

Have any questions? Put them below and we will help you out!

  1. Hi David, for some reason when I create the README file and then change/add the text and hit ‘commit’ again, my README file isn’t there to stage. I’ve tried deleting the local-first project, creating a new one and starting over, and I get the same issue.

      1. I did try, and I saw it and was able to hit commit and ‘stage’ it with a comment. But later when I wanted to add more text and hit commit again to continue testing it out, it was gone again from being able to stage.

  2. Hi David! I’m getting an error when I try to run a commit. I was able to do it previously but today it’s not working. I have restarted R and gone through Configure Git, Create a Local Git Repository, and Commits again and am still having the same error.
    “On branch master
    Changes not staged for commit:
    (use “git add …” to update what will be committed)
    (use “git restore …” to discard changes in working directory)
    modified: README.md

    Untracked files:
    (use “git add …” to include in what will be committed)

    no changes added to commit (use “git add” and/or “git commit -a”)”

    2 Questions:
    1) What should I do with this error?
    2) I noticed that I saved the .md file before committing, and have run at least 3-4 commits, but will only see the original file I uploaded and the most recent commit, not any of the commits in between. How can I make the interim commits display too?

    1. I got to Office Hours with Charlie – I forgot to tick the box next to the “README” file I was trying to stage 🙂 All good now but posting in case anyone else is having this issue too.