FreeKB - View the status of a file in Git
View the status of a file in Git

Home > Search


If you are not familiar with Git, check out our getting started article. These examples are based on Linux. This assumes you have already added a file in Git.

The git status command will show if a file is ready to be committed. In this example, foo.txt is not ready to be committed. This usually occurs when no changes have been made to the file.

git status /path/to/foo.txt
. . .
nothing to commit (working directory clean)

 

When a new file is added to git, the following will be displayed.

git status /path/to/foo.txt
. . .
Changes to be committed:
. . .
  new file: foo.txt

 

When a change is made to a staged or commited file, the file will be listed as modified in the git status command.

git status /path/to/foo.txt
. . .
  modified: foo.txt

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 6ab57 in the box below so that we can be sure you are a human.




Comments