79838676

Date: 2025-12-05 08:30:18
Score: 0.5
Natty:
Report link

You seem to ask your question on the premise that git keeps a "list of files which have been changed". It does not. Each git add updates the index, and when a later command (status, commit) needs to know what's to be committed, it is computed from analysing the HEAD commit, the index and the working tree. As a sidenote, we could have done without the defensive disclaimer about downvotes. Let people do their thing and focus on the subject matter, if I may. Agreed with user207421: XY problem here. (Btw, this is not an insult to you, it's a judgement on the question.)

Reasons:
  • RegEx Blacklisted phrase (2): downvote
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): user207421
  • Single line (0.5):
  • High reputation (-2):
Posted by: Romain Valeri