0

When I type git status (with advice.statusHints = False) I get something like:

On branch main
Changes to be committed:
  new file: file1
Changed not staged for commit:
  modified: file2
Untracked files:
  file3

Is it possible to customise this printed output so it could look something like:

On branch main
$$
  new file: file1
**
  modified: file2
%% 
  file3

This is just an example, but it could make things more concise. Is it possible to do anything like this?

torek
  • 448,244
  • 59
  • 642
  • 775
user615536
  • 109
  • 1
  • 1
  • 5
  • 1
    You could add the `--porcelain` flag and parse the output manually. – Stephen Newell Apr 18 '22 at 16:08
  • Some Git commands have very flexible outputs, and some don't. `git status` is in between: there are no formatting directives (unlike `git log --format` for instance) but there are the `--porcelain` and `--porcelain=v2` options for machine-readable output, and there is `--short` and there are several options for longer output. Read each commands' documentation to see what can be done for each command. – torek Apr 19 '22 at 10:21
  • You could write a script and parse the output in any desired fashion, similar to https://stackoverflow.com/a/22193283/341994 – matt Apr 19 '22 at 13:04

0 Answers0