git中的文件显示为在先前暂存和提交文件后未暂存

时间:2013-08-26 11:14:24

标签: git version-control repository

我刚刚在我的Git仓库上演并提交了一些文件。我与远程仓库保持一致,所以在我执行git commit之后,我完成了git status,并期望看到我在回购之前做了一次提交。

但是,我发现所有被更改的文件都发现自己仍然被标记为已修改,并且再次位于暂存区域之外。

我在此提交中提交了一些新的先前未跟踪的文件。 列出的文件已更改,因此必须已成功提交。

我不明白为什么这些其他文件会再次显示为已更改/未暂停?

我正在使用Git 1.8.2.1。

我觉得令人困惑的是,当我执行git add -A并再次添加所有文件然后提交 识别它们。为什么有时需要两次提交才能获得所需的结果?

当我首先执行git statusgit commit和最后一个git status以查看我的位置时,这是终端的输出:

# On branch CRMPICCO-1872
# Your branch is ahead of 'origin/CRMPICCO-1872' by 3 commits.
#   (use "git push" to publish your local commits)
#
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   sass/iphone/page/sun.scss
#       modified:   web/load/sun.inc.php
#       modified:   web/content/iphone/sun.inc.php
#       modified:   web/css/compressed/iphone/checkout.css
#       modified:   web/css/compressed/iphone/style.css
#       modified:   web/scripts/iphone/js/iphone.js
#       modified:   web/scripts/jquery_mobile/swipe/swipe.jquery.js

git commit -m 'My Commit Message In Here'

[CRMPICCO-1872 5f248ca] My Commit Message In Here  4 files changed, 45 insertions(+), 54 deletions(-)

git status

# Your branch is ahead of 'origin/CRMPICCO-1872' by 4 commits.
#   (use "git push" to publish your local commits)
#
# 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:   web/content/iphone/sun.inc.php
#       modified:   web/css/compressed/iphone/checkout.css
#       modified:   web/css/compressed/iphone/style.css
编辑:这是现在(再次)发生的截图。

enter image description here

0 个答案:

没有答案