Post #2305576
2026-05-08 11:44 UTC
Yet another brilliantly useful git command that I will instantly forget:
% git add -N .
Marks all new files as tracked-but-not-staged, so git diff will show them but they aren't in the index yet.
Replies (4)
-
@alister@hachyderm.io 2026-05-08 15:26
@tastapod@mas.to it's also known as `--intent-to-add`, which is how I usually use it
-
@hamatti@mastodon.world 2026-05-08 15:31
@tastapod@mas.to Omg, I had no idea! I've been annoyed that git diff doesn't show them, this is gonna make such a big difference.
-
@jimfl@hachyderm.io 2026-05-08 15:47
@tastapod@mas.to Another argument for not using git commands directly, but building and extending tooling that suits your (or your team’s) workflow on top of git instead
-
@SRAZKVT@tech.lgbt 2026-05-08 19:12
@tastapod@mas.to -N is --intent-to-add right ? i use it mostly because git add -p doesn't work on untracked files, which is annoying as i use it quite extensively