【发布时间】:2021-05-05 02:13:59
【问题描述】:
因此,例如,如果我有一个文件 index.html 并更改一些行并执行 git add index.html。然后我将再次修改 index.html 但不会进行阶段性更改。并执行git commit 和git push。我最后的更改是否会应用到commit/push?
【问题讨论】:
-
你试过这个吗?请先告诉你的发现
-
欢迎来到 Stackoverflow。添加到暂存区域的最后更改将在提交中。这也称为缓存。使用
git diff --cached查看将提交或提交的内容,使用git show HEAD查看已提交的内容。通过Recording Changes to the Repository 了解,查看您的分阶段和未分阶段的更改部分可能对您来说特别有趣。
标签: git github commit git-stage