仅添加已修改的已暂存的文件

时间:2020-09-03 17:58:06

标签: git

如何重新添加已暂存的文件,但是在暂存后进行修改?我不想一个接一个地手动添加它们。

firebase

这里我不想上演$ git status On branch master Changes to be committed: (use "git reset HEAD <file>..." to unstage) modified: file1 modified: file2 Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: file1 modified: file3

1 个答案:

答案 0 :(得分:2)

结果是file3为此提供了一个选项:

git update-index

在其索引条目与git update-index --again 提交的索引条目不同的路径上运行git update-index本身。

来源: