Check the status of the working tree and repo:
git status
Note that there are “No commits yet”, there are lots of “Untracked files”.
Add all the 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
Note that a Nano editor has opened.
Type a log message for the commit:
Add new app skeleton
Press Ctrl-X to save the log message:
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
If you don’t have oh-my-zsh installed, you will have to run this longer version of the gloga
command:
git log --oneline --decorate --graph --all
Note that there is now one commit, the main
branch pointer points at it, and the HEAD
pointer points at main
.
Press Q to quit out of the gloga
screen.
⏴ Back | Next ⏵ |