View current status

Git, Branch · Apr 13, 2021

Prints the current status of the working tree.

  • Use git status to view the current status of the working tree.
  • You can optionally add the -sb flag to view the short form of the same output
git status [-sb]
git status
# On branch patch-1
# Your branch is up to date with 'origin/patch-1'.
# Untracked files:
#  (use "git add <file>..." to include in what will be committed)
#  30-seconds.txt
# nothing added to commit but untracked files present (use "git add" to track)

git status -sb
# ## patch-1...origin/patch-1
# ?? 30-seconds.txt

Written by Angelos Chalaris

I'm Angelos Chalaris, a JavaScript software engineer, based in Athens, Greece. The best snippets from my coding adventures are published here to help others learn to code.

If you want to keep in touch, follow me on GitHub or Twitter.

More like this