To inspecting a git repository we generally use following two command.
git status command shows the detail of staged, unstaged and untracked files.
git status command output is like below.
It is good practice to check the status of working repo before committing changes so that you do not commit something wrong.
git log command shows the committed snapshots.It operates on the committed history,While git status lets you inspect the working directory.
git log command output is like below.
Limit the number of commits by limit.
git log -n 2