If you add a new file to your code which you want to add to git later, you can show that intent early with
git add --intent-to-add.
This is quite useful when want to add new files to the index (so you don’t forget about them later), but you’re still working on them and don’t want to add the content just yet 🥳
This is what the git documentation says:
-N, --intent-to-add Record only the fact that the path will be added later. An entry for the path is placed in the index with no content. This is useful for, among other things, showing the unstaged content of such files with git diff and committing them with git commit -a.