- git init
- git add filename
- git commit -m message
- git status
- git diff
- Add a file in the Terminal:
touch animals.txt
- Initialize git:
git init
- Modify the file:
echo "Monkeys are my favorite animal" >> animals.txt
- Add the file to the Staging Area:
git add animals.txt
- Commit your changes:
git commit -m "Add favorite animal"
- Repeat steps 3 through 5, but this time add your second favorite animal (when commiting, be sure to add a new message). Check the status between each steps using the
git status
command, and check the difference after you modify the file usinggit diff