Git:能否分阶段提交补丁?

3

我不清楚你想要什么。你的意思是要修改索引而不影响工作树吗?最终的目标是什么? - fge
1个回答

4
你想要使用git apply --cached 从手册页面得知:
该命令将尝试将给定的补丁应用于缓存区而不是工作目录。
   --cached
       Apply a patch without touching the working tree. Instead take the cached data, apply the patch, and store
       the result in the index without using the working tree. This implies --index.

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接