[Git operation] View log information

1 Introduction

In the process of using git, you often need to watch the file status, submission status, and operation status. This article will introduce the main operating commands for viewing log information.

2. Use

git status: Display the file status under the current branch
git add .before
Insert picture description here
git add .adding after addingInsert picture description here

git diff: Display the content of this change.
Insert picture description here
Red represents the deleted content, and the green represents the added content
git log: displays all the information in the log, including submission information, time, and author.
Insert picture description here
Head is the location of the current branch, and the prefix with origin is the remote Branch, which represents the submission position where the branch stays
git log --all: display all the submitted content under this project
git log --oneline: display the main information of the changes in the submission
Insert picture description here

git log --graph: Display the changes in the submission in the form of line segments
Insert picture description here
git log --reverse: Reverse display all logs
git log --author=Linus: Display operation logs whose author is Linux
git log -n: Display n logs
git history: Command line operation logs

Guess you like

Origin blog.csdn.net/weixin_44704985/article/details/113989405