About Git log
Git log-Details
❖ Git log is a utility tool to review and read a history of everything that happens to a repository. Multiple options can be used with a git log to make history more specific.
❖ Generally, the git log is a record of commits. A git log contains the following data:
➢ commit hash number which is a 40 character checksum data generated by the SHA (Secure Hash Algorithm) algorithm. It is a unique number.
➢ Commit Author metadata: The information of authors such as author name and email.
➢ Commit Date metadata: It's a date timestamp for the time of the commit.
➢ Commit title/message: It is the overview of the commit given in the commit message.
Different Commands of Git log:
➔ git log
◆ Whenever you need to check the history, you have to use the git log command. The basic git log command will display the most recent commits and the status of the head.
➔ git log --oneline
◆ the --oneline git log to display:
● one commit per line ● the first seven characters of the SHA ● the commit message
➔ git log --stat
◆ stat option is used to display
● the modified files, ● The number of lines that have been added or removed ● A summary line of the total number of records changed ● The lines that have been added or removed.
➔ git log --p or git log --patch
◆ This command is used to display:
● Modified files ● The location of the lines that you added or removed ● Specific changes that have been made
➔ git log --graph
➔ git log --graph --oneline
➔ By Amount:
◆ git log -1
➔ By Date and Time:
◆ git log --after="yy-mm-dd"
➔ By Author:
◆ git log --author="Praveen"
➔ By Commit message:
◆ git log --grep="Updated"
Comments
Post a Comment