git add

Table of Contents

Add untracked files with --patch howto

$ echo hello > target-file
$ git add --patch
No chagnes.
$ git add --intent-to-add target-file
$ git add --patch
index e69de29..ce01362 100644
--- a/sub1/target-file
+++ b/sub1/target-file
@@ -0,0 +1 @@
+hello
# Mark all files including untracked to add
git add --intent-to-add --all