Is there a reference for all of the status notations (e.g. AD
, MM
, ??
) output from git status --porcelain
? I'm parsing this output and need to make sure I have all the permutations covered. Reading through the git source code, it looks like the output is assembled on the fly rather than templated and I'm not confidant in my ability to find every edge case there.
Here's what I have:
??: 'untracked',
A: 'staged',
AD: 'staged_deleted',
AM: 'staged_modified',
D: 'deleted',
M: 'modified',
MM: 'staged_modified',
R: 'renamed',
UU: 'conflicted'
It's under the Short Format section of git status
:
or paths with merge conflicts,
X
andY
show the modification states of each side of the merge. For paths that do not have merge conflicts,X
shows the status of the index, andY
shows the status of the work tree. For untracked paths,XY
are??
. Other status codes can be interpreted as follows:' ' = unmodified
M = modified
A = added
D = deleted
R = renamed
C = copied
U = updated but unmerged
X Y Meaning
-------------------------------------------------
[MD] not updated
M [ MD] updated in index
A [ MD] added to index
D [ M] deleted from index
R [ MD] renamed in index
C [ MD] copied in index
[MARC] index and work tree matches
[ MARC] M work tree changed since index
[ MARC] D deleted in work tree
-------------------------------------------------
D D unmerged, both deleted
A U unmerged, added by us
U D unmerged, deleted by them
U A unmerged, added by them
D U unmerged, deleted by us
A A unmerged, both added
U U unmerged, both modified
-------------------------------------------------
? ? untracked
! ! ignored
-------------------------------------------------
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