Step 2

Add this content to README.md:

# SleepTime App

A simple web application
similar to sleepyti.me but
limited to suggesting "wake up" 
times based on calculating sleep cycles.

* A sleep cycle lasts about 90 minutes
and a good nights sleep consists of
5-6 sleep cycles.
* If you wake up in the middle of a
sleep cycle, you will feel groggy 
even if you've completed several 
cycles prior to waking up.

Save the file and then run the following command.

git status

Git should inform you that README.md has been modified, and that changes made to it has not been staged for commit.

Run the following command to stage the changes for commit:

git add README.md

And then, commit the changes:

git commit -m "Add description for this app"

Feel free to check the status (git status) and logs (git log) now.

More changes!

I want to make the following changes to the README.md file:

  • Fix a type: change a good nights sleep to a good night's sleep
  • Link to sleepyti.me web page: change sleepyti.me to [sleepyti.me](https://sleepyti.me/)

I can edit and then commit the changes in one go. I would prefer, however, to commit changes one by one. So, let's fix the type, and then commit the changes.

git commit -am "Fix typo"

Notice I skipped git add and instead used the flag -am with the commit command.

The flag -a says to automatically stage files that have been modified and deleted, but new files you have not told Git about are not affected.

Next, let's link to sleepyti.me web page. Then, commit the changes.

git commit -am "Link to sleepyti.me URL"

Looking at the logs (using git log), I have the following history

commit 28bca5f1424cdeba23624db9deae765e4c97d793 (HEAD -> master)
Author: Ali Madooei <madooei@jhu.edu>
Date:   Sat Sep 5 11:36:56 2020 -0400

    Link to sleepyti.me URL

commit cb53f8da1ba1940486c4b5d2997929e6d7040b21
Author: Ali Madooei <madooei@jhu.edu>
Date:   Sat Sep 5 11:34:26 2020 -0400

    Fix typo

commit 79cbc98629aa98b11003c48b5a3a4cf79c78f292
Author: Ali Madooei <madooei@jhu.edu>
Date:   Sat Sep 5 11:15:49 2020 -0400

    Add description for this app

commit f034c1ea747a6ab6726681d60a7bd5b097ff40b8
Author: Ali Madooei <madooei@jhu.edu>
Date:   Sat Sep 5 10:21:54 2020 -0400

    Create README file