Git status command provides information about the local working directory.It provides information such as:
- Current branch
- Files in the staging area
- Untracked/tracked files
As the message above states that there is an untracked file test.txt we can add the file using the git add command:
$ git add test.txt
As we can see above using just the git status command displays a detailed output.If we do not want to display all the messages and hints.To prevent all the hints from getting displayed we can use the -s switch as:
$ git status -s
Now instead of displaying detailed output we get only the relevant information.Here it displays a single untracked file test.txt.
Leave a Reply