0

It doesn't take much effort to type git status as a follow-up command to something like git add ., but I'm wondering if there's a flag that can be appended to the first command, e.g. git add . -st[atus] (that's obviously not a real flag, but you get the idea). It would be nice to get something more than a prompt after entering a command.

1
  • If you want to have the git status after every command you can change your prompt. Commented Nov 17, 2014 at 18:01

1 Answer 1

1

As far as I know, this kind of command-line option doesn't exists.

What about defining an alias? For example you can alias 'status' with 'st', this allows you to type git st instead of git status.

git alias st status

If you're under a bash environment, you can also define a classical alias, for example gst for git status. Simply type in ~/.bash_aliases or similar config file

alias gst='git status'

Sign up to request clarification or add additional context in comments.

1 Comment

My main objective was to modify a command by appending a status flag to avoid a second entry, even if that second entry is only a couple of characters. It's not a make-or-break issue, I just assumed the flag already existed. I'll probably change my prompt, as Micha Wiedenmann suggested.