Check the status of the working tree and repo:
git status
Note that this time there are both “Changes not staged for commit” and “Untracked files”.
Add all the changes and untracked files to the staging area:
git add -A
Check how the status has changed:
git status
Note that there are now lots of “Changes to be committed”.
Commit the staged changes:
git commit
Enter this log message in the Nano editor:
Add Person model and scaffold pages
Like last time, to save, press Ctrl-X, press Y, and press Enter.
Check how the status has changed:
git status
Note that there are no pending changes and the working tree is “clean”.
View the commit log graph visualization:
gloga
Note that there are now two commits, the main
branch pointer now points at the newest commit, and the HEAD
pointer still points at main
.
Press Q to quit out of the gloga
screen.