1

~ master ?49 ❯ git status
> warning: could not open directory '.Trash/': Operation not permitted
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)

~ master ?49 ❯
> nothing added to commit but untracked files present (use "git add" to track)

What does ?49 mean? Does it have to do something with Git?

Also, when I enter git status it lists all my files and give me this:

> nothing added to commit but untracked files present (use "git add" to track) 
Biffen
  • 6,249
  • 6
  • 28
  • 36
maievS
  • 29
  • 1
  • 4
  • Is this similar to https://github.com/Powerlevel9k/powerlevel9k/issues/60? – VonC Nov 26 '19 at 05:53
  • 3
    @maievS : You ask about the meaning of the characters in your prompt, but you did not post how you have defined your prompt string! – user1934428 Nov 26 '19 at 07:36
  • 1
    @maievS : On `git status`, `git` always lists those file in your git directory which are not put into git yet. You have to make up your mind: Either you add the files into your repo, or you put them into `.gitignore`. – user1934428 Nov 26 '19 at 07:37
  • 1
    This is why I don't like using `oh-my-zsh`. It provides a giant pile of customization that the user isn't necessarily aware of, making it difficult to answer questions like "Why does my shell behave like this?" (As a source of *ideas* for customization, I love `oh-my-zsh`.) – chepner Nov 26 '19 at 12:42
  • I suspect 49 refers to the number of untracked files, which `git status` (but not `zsh`) ignores. – chepner Nov 26 '19 at 13:05

1 Answers1

0

?49 in your prompt means there are 49 untracked files in the current Git repository.

From the Powerlevel10k FAQ:

Q: What do different symbols in Git status mean?

When using Lean, Classic or Rainbow style, Git status may look like this:

feature:master ⇣42⇡42 *42 merge ~42 +42 !42 ?42

Legend:

| Symbol  | Meaning                                                           | Source                                               |
| --------| ------------------------------------------------------------------| ---------------------------------------------------- |
| feature | current branch; replaced with #tag or @commit if not on a branch  | git status                                           |
| master  | remote tracking branch; only shown if different from local branch | git rev-parse --abbrev-ref --symbolic-full-name @{u} |
| ⇣42     | this many commits behind the remote                               | git status                                           |
| ⇡42     | this many commits ahead of the remote                             | git status                                           |
| *42     | this many stashes                                                 | git stash list                                       |
| merge   | repository state                                                  | git status                                           |
| ~42     | this many merge conflicts                                         | git status                                           |
| +42     | this many staged changes                                          | git status                                           |
| !42     | this many unstaged changes                                        | git status                                           |
| ?42     | this many untracked files                                         | git status                                           |

See also: How do I change the format of Git status?

If you've created a Git repository at the root of your home directory to store dotfiles, you probably want to ignore untracked files in it. You can achieve this by executing the following command:

git -C ~ config status.showuntrackedfiles no

This will have several effects:

  • The warning about permissions on .Trash will disappear.
  • git status will be faster.
  • git status won't list 49 untracked files.
  • ?49 will disappear from your prompt.

You can undo the above command with the following command:

git -C ~ config --unset status.showuntrackedfiles
Roman Perepelitsa
  • 2,148
  • 19
  • 14