Why git describe does not give me dirty suffix when untracked file existed?

Viewed 198

git status show me some untracked files. But git describe did not give me dirty flag. Why?

user@host:~$ git status
On branch master
Your branch is ahead of 'origin/master' by 16 commits.
  (use "git push" to publish your local commits)

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        
nothing added to commit but untracked files present (use "git add" to track)
user@host:~$ git describe --dirty --tags
v0.3-4-3-geadf778
1 Answers

--dirty looks for uncommitted modifications on tracked files ; untracked files are completely ignored.

If you want to make git "aware" of extra files, you can use git add file1 file2 ... or git add --intent-to-add file1 file2 ...

Related