I use git status with the branch and short configuration flags set to true at ~/.gitconfig
and, after reading the git config
and git commit
documentation pages, I couldn't find a way that replicates this behaviour to git commit
without the usage of aliases. The only obvious configuration option related to status output is related to the message that is presented at vim (or whatever is the default editor) while editing the commit message. Is there a way to achieve this that I am missing? If so, links to relevant documentation sections would be appreciated!
The expectation here is not to make the git commit
command to perform an implicit --dry-run
by default (through the usage of --short
), it is solely related to the command output.
Sample Expected Output:
$ git status
## master
M foo
?? bar
$ git commit
## master
M foo
?? bar
Sample Actual Output:
$ git status
## master
M foo
?? bar
$ git commit
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: foo
Untracked files:
(use "git add <file>..." to include in what will be committed)
bar
no changes added to commit (use "git add" and/or "git commit -a")