Git状态有点令人困惑 [英] Git status a bit confusing
本文介绍了Git状态有点令人困惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Git在我的一个分支上报告了以下状态:
Git reports the following status on one of my branches:
# On branch awesome
# Changes to be committed:
# (use "git reset HEAD ..." to unstage)
#
# new file: NEW.txt
#
# Changed but not updated:
# (use "git add ..." to update what will be committed)
#
# modified: NEW.txt
#
这是因为我创建了 NEW.txt
然后命令:
This came about because I created NEW.txt
then commanded:
git add NEW.txt
并稍后编辑该文件。这是否意味着执行 git commit
会提交我对该文件所做的最新更改,或者我应该格外小心?
and later edited the file. Does this mean that doing git commit
will commit the latest changes I've made to the file, or should I take extra caution?
解决方案
Git版本内容而不是文件。 c>将在下一次提交时提交。
Git versions content rather than files. So, the content at the time you git add
will be committed with the next commit.
这篇关于Git状态有点令人困惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文