我无法理解,为什么新克隆的git存储库会显示提交的更改没有停滞不前。
这是一个简短的例子:
[dpetrov@macbook-pro ~/work]$ git clone /tmp/git/pollers.git pollers
Cloning into 'pollers'...
done.
[dpetrov@macbook-pro ~/work]$ cd pollers/
[dpetrov@macbook-pro ~/work/pollers (master)]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
[dpetrov@macbook-pro ~/work/pollers (master)]$ git checkout pollers-1.0
gBranch pollers-1.0 set up to track remote branch pollers-1.0 from origin.
Switched to a new branch 'pollers-1.0'
i
[dpetrov@macbook-pro ~/work/pollers (pollers-1.0)]$ git status
On branch pollers-1.0
Your branch is up-to-date with 'origin/pollers-1.0'.
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: share/mibs/IANAifType-MIB.mib
no changes added to commit (use "git add" and/or "git commit -a")
[dpetrov@macbook-pro ~/work/pollers (pollers-1.0)]$ git diff share/mibs/IANAifType-MIB.mib
diff --git a/share/mibs/IANAifType-MIB.mib b/share/mibs/IANAifType-MIB.mib
old mode 100644
new mode 100755
index 3b4added..14da8028
--- a/share/mibs/IANAifType-MIB.mib
+++ b/share/mibs/IANAifType-MIB.mib
@@ -1,13 +1,11 @@
--- Extracted from http://www.iana.org/assignments/ianaiftype-mib
---
- IANAifType-MIB DEFINITIONS ::= BEGIN
+IANAifType-MIB DEFINITIONS ::= BEGIN^M
IMPORTS
MODULE-IDENTITY, mib-2 FROM SNMPv2-SMI
TEXTUAL-CONVENTION FROM SNMPv2-TC;
ianaifType MODULE-IDENTITY
- LAST-UPDATED "200505270000Z" -- May 27, 2005
+ LAST-UPDATED "200411220000Z" -- June 17, 2004^M
ORGANIZATION "IANA"
CONTACT-INFO " Internet Assigned Numbers Authority
任何线索如何调试它以及可能导致它的原因?
非常感谢。
答案 0 :(得分:0)
这是文件名区分大小写的问题:两个不同的文件(名称的大小写不同)存储在git中。
检查差异时,git会收到两个名称之一的“错误”内容。