【发布时间】:2015-03-11 13:24:41
【问题描述】:
我正在做一个我使用两个不同虚拟机的东西。在第一个上,我创建了一个文件,我添加、提交并推送到存储库。稍后,我将存储库克隆到另一个 VM 上。然后我回到第一个 VM 对文件进行一些更改以添加并提交更改,然后再拉上第二个 VM。问题是我没有完成所做的更改,它说:Already up-to-date.
在克隆 VM 上,git log 输出:
root@master:/home/test/hello/learning# git log
commit 1f15a20164b57303d1cc8bb8f518b4560ad44ad9
Author: test <test@stud.cn.no>
Date: Tue Jan 13 14:30:33 2015 +0000
2nd
commit 77950eb49e28aadd49ddb78b9a48701c4ecb910a
Author: test <test@stud.cn.no>
Date: Tue Jan 13 14:27:53 2015 +0000
Forste
在我创建存储库的 VM 上,git log 给出:
root@python:/home/ubuntu/learning# git log
commit 89fead2b83d16373723d06954a0f4f29a695d6f4
Author: test <test@stud.cn.no>
Date: Tue Jan 13 14:34:31 2015 +0000
NA
commit 1f15a20164b57303d1cc8bb8f518b4560ad44ad9
Author: test <test@stud.cn.no>
Date: Tue Jan 13 14:30:33 2015 +0000
2nd
commit 77950eb49e28aadd49ddb78b9a48701c4ecb910a
Author: test <test@stud.cn.no>
Date: Tue Jan 13 14:27:53 2015 +0000
Forste
而git status 给出:
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)
【问题讨论】:
标签: git github push gitlab git-pull