Update a file
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 night's 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 before 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 have 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"
Now, check the status (git status
) and logs (git log
).
I want to make the following change to the README.md
file to link to sleepyti.me web page:
-A simple web application similar to sleepyti.me but limited to suggesting "wake up" times based on calculating sleep cycles.
+A simple web application similar to [sleepyti.me](https://sleepyti.me/) but limited to suggesting "wake up" times based on calculating sleep cycles.
Once made the change, commit it
git commit -am "Link to sleepyti.me URL"
Notice I skipped git add
and instead used the -am
flag with the commit
command.
The
-a
flag automatically stages files that have been modified and deleted, but new files you have not told Git about are not affected.
I have the following history of changes when I run the git log
command:
commit 2116411a3bec83072de94fc354efe5fb8f493905 (HEAD -> main)
Author: Ali Madooei <alimadooei@gmail.com>
Date: Thu Sep 1 09:59:22 2022 -0400
Link to sleepyti.me URL
commit d0f33835f7910c5ed74708e2b7a2fa85211d50c0
Author: Ali Madooei <alimadooei@gmail.com>
Date: Thu Sep 1 09:57:31 2022 -0400
Add description for this app
commit 3d7292fd9530ce727fcf8323a4b2cc207d1e6ad5
Author: Ali Madooei <alimadooei@gmail.com>
Date: Thu Sep 1 09:47:33 2022 -0400
Add README file