Post #2302393
2026-05-06 18:22 UTC
#TIL: `git add --intent-to-add`. Signals, well, an intent to add a file. Importantly, this means `git diff` will diff it against an empty file, allowing for a more complete working tree patch such as:
git add --intent-to-add .
(git status; echo; git diff) >../tree.patch
Keep in mind that this also means `git reset --hard` will remove the untracked files.
Replies (0)
No replies.