When I type git status
I see:
T /path/to/file... M /path/to/otherfile...
What exactly does the T
git status
mean?
I tried man git-status
(I think it should be there, but isn't).
The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git.
^M represents carriage return. This diff means something removed a Unicode BOM from the beginning of the line and added a CR at the end.
To check the status, open the git bash, and run the status command on your desired directory. It will run as follows: $ git status.
C: copy of a file into a new one D: deletion of a file M: modification of the contents or mode of a file R: renaming of a file T: change in the type of the file X: "unknown" change type (most probably a bug, please report it)
It means that the type of a file changed. For example, a symbolic link that became a regular file.
As far as I know, this only applies to symlinks, submodules and regular files
Edit
A source was requested for this information. While this is simply information that's in my head, I was able to find a few references to it on the internet. The most prominent one was a git changelog mentioning "T" as a type change and "D" as a deletion.
Edit 2 (updating this because it's my highest rating answer so far)
As pointed out by @PhilipOakley, man git-diff-files
actually does show this information.
Possible status letters are:
- A: addition of a file
- C: copy of a file into a new one
- D: deletion of a file
- M: modification of the contents or mode of a file
- R: renaming of a file
- T: change in the type of the file
- U: file is unmerged (you must complete the merge before it can be committed)
- X: "unknown" change type (most probably a bug, please report it)
As pointed out by @Mat, it's also in diff.h
, line 289:
#define DIFF_STATUS_TYPE_CHANGED 'T'
And in wt-status.c
, line 282:
case DIFF_STATUS_TYPE_CHANGED: status_printf_more(s, c, _("typechange: %s"), one); break;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With