Adding Only Untracked Files

前端 未结 11 1954
傲寒
傲寒 2020-12-07 07:04

One of the commands I find incredibly useful in Git is git add -u to throw everything but untracked files into the index. Is there an inverse of that? In the la

11条回答
  •  广开言路
    2020-12-07 07:52

    It's easy with git add -i. Type a (for "add untracked"), then * (for "all"), then q (to quit) and you're done.

    To do it with a single command: echo -e "a\n*\nq\n"|git add -i

提交回复
热议问题