Open In App

Examining Git

After basic snapshotting of a repository, following commands are used to get it’s commit history.

Now, we will discuss each command and its different available options.



git log: As the name suggests, this command shows commit logs. It is a command which allows you to view information about the previous commit. Unlike git status command, it only inspects the history of committed repository.

git shortlog: This command is “Sub-command” of git log as it summaries git log output. Each commit is grouped by author and title.



git diff: This command is used to compare different versions of the file or in other words, it shows the changes between the commits, working tree, branches, files, etc.

Summarizing: We learned that a git log command is a basic tool that is used to go through the history of commits. git log is a running record of commits. git shortlog is just a subcommand of git log- summarizing the output of git log. We have just described git diff command as it one of the most advanced options of git.

Article Tags :