foreword
When making changes to the project, we usually need to know which files have been changed, which files have been changed and are not temporarily stored, and which files have been changed and have been added to the staging area for the next commit. The above tasks can be solved by using git status. But if you want to know where the file has been changed, git status is helpless. At most, git status will only tell you whether it has been changed or not, and I don’t know where it has been changed. git diff can solve this problem.
git status
The output of the git status command is quite verbose, but its language is a bit verbose. If you use the git status -s command or the git status –short command, you will get output in a more compact format. Running git status -s , the output of the status report is as follows:
$ git status - s M README MM
…
The post git commands – git status, git diff first appeared on Lenix Blog .
This article is reprinted from https://blog.p2hp.com/archives/9411
This site is for inclusion only, and the copyright belongs to the original author.