Follow us on X (Twitter)  Like us on Facebook  Connect with us on LinkedIn  Subscribe to our YouTube Channel  Subscribe to our WhatsApp Group

In the last two posts of the "Git Basics" series, we learned how to stage changes and save/commit to Git remote repository. I hope, that was clear and easy to understand. Today we are going to see how to show the working tree status.

 

Let's continue learning the "git status" command today with the parameters that you need to know. Stay tuned to read more posts on Git Basics.

 

How to show the working Git tree status (www.kunal-chowdhury.com)

 

The command "git status" displays paths that have differences between the index file and the current HEAD commit. This is the one that you generally commit by running the command "git commit".

 

It also displays the paths that have differences between the working tree and the index file; the paths in the working tree that are not tracked by Git. These are the ones that you could commit by running "git add" before running "git commit".

 

Show the output in short-format:

$ git status -s

$ git status --short

 

Show the branch and tracking info even in short-format:

$ git status -s -b

$ git status --short --branch

 

Show the output in long-format:

$ git status -long                         # This is the default command, when you just say "git status"

 

Show no untracked files:

$ git status -uno

 

Show untracked files and directories:

$ git status -unormal

 

Show all, including individual files in untracked directories:

$ git status -uall

 

Was this post useful? If you came to this page by searching online about “git basics” or “git tutorials”, please have a look into my other blog posts. Subscribe to the RSS feed or the email newsletter to keep yourself updated.

 

 

 

Have a question? Or, a comment? Let's Discuss it below...

dhgate

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.