How To Check Status Of Your Files?
Table Of Contents:
- What Is The Status Of A File?
- How To Check The Status Of Files?
- Examples Of Checking Status.
(1) What Is The Status Of A File?
- By knowing the status of a file we can see, which changes have been staged, which haven’t, and which files aren’t being tracked by Git.
- It will just show you, in which state the files are.
(2) How To Check Status Of Files?
- To check the status of the file run the below command.
git status
(3) Examples Of Checking Status
Example-1: Initial State
git status
Note:
- At first, the files are untracked, which means ‘git’ is not tracking the files.
- Any changes made to the files will not be tracked by ‘git’.
- Untracked files will be in red colour.
Example-2: After Adding To Staging Area
git add .
git status
Note:
- When you add the files to the staging area, any changes made to the file will be tracked by ‘git’.
- Stagged files will be in green colour.
Example-3: After You Make Changes To File
git status
Note:
- You can see that it is showing File1.txt is being modified.