Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
因此,例如,如果我有一个文件index.html并更改一些行并执行git add index.html. 然后我将再次修改index.html但不会进行阶段更改。并且做git commit和git push。我最后的更改会应用在commit/中push吗?
git add index.html
git commit
git push
commit
push
不,您的最后更改不会提交并推送到 git 服务器。只有在暂存区( git add) 中的文件才会被提交并且可以被推送。如果您更改文件并且不添加到暂存区域 ( git add),那么您不会提交或推送它到 git 服务器。
git add
如果您还想添加最后的更改并将其推送到服务器,请git add再次提交并推送它。