This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

git on cygwin howto?


I'm using cygwin 1.5.24-2 with git 1.5.3-1, and I can't get past even
the most fundamental first steps, which, on Linux, work fine.  I'd
simply like to understand what is going wrong.  From cygwin bash:

$ mkdir test
$ cd test
$ git init
Initialized empty Git repository in .git/
$ git status
# On branch master
#
# Initial commit
#
fatal: cannot use /home/Peter/test/.git/info/exclude as an exclude file

Why the fatal immediately after git init?  Let's remove the exclude
file.

$ ls -al
total 8
drwxr-xr-x+ 3 Peter None     0 Sep 23 15:01 .
drwxrwxrwx+ 6 Peter Users 4096 Sep 23 15:01 ..
drwxr-xr-x+ 7 Peter None  4096 Sep 23 15:01 .git
$ ls -al .git/info
total 5
drwxr-xr-x+ 2 Peter None    0 Sep 23 15:01 .
drwxr-xr-x+ 7 Peter None 4096 Sep 23 15:01 ..
-rwxr-xr-x  1 Peter None  246 Sep 23 15:01 exclude
$ rm .git/info/exclude
$ git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
$ echo Hello > bollox
$ git add bollox
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached <file>..." to unstage)
#
#       new file: bollox
#
$ git commit -m "bollox"
Created initial commit 580cb9f: bollox
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 bollox
$ git status
error: bad index file sha1 signature
fatal: index file corrupt
# On branch master
error: bad index file sha1 signature
fatal: index file corrupt

What's going on?  As soon as an index file is created, it is corrupt.

$ find .git -type f -exec ls -al {} \;
-rw-r--r-- 1 Peter None 97 Sep 23 15:01 .git/config
-rwxr-xr-x 1 Peter None 59 Sep 23 15:01 .git/description
-rw-r--r-- 1 Peter None 24 Sep 23 15:01 .git/HEAD
-rwxr-xr-x 1 Peter None 456 Sep 23 15:01 .git/hooks/applypatch-msg
-rwxr-xr-x 1 Peter None 801 Sep 23 15:01 .git/hooks/commit-msg
-rwxr-xr-x 1 Peter None 160 Sep 23 15:01 .git/hooks/post-commit
-rwxr-xr-x 1 Peter None 526 Sep 23 15:01 .git/hooks/post-receive
-rwxr-xr-x 1 Peter None 215 Sep 23 15:01 .git/hooks/post-update
-rwxr-xr-x 1 Peter None 401 Sep 23 15:01 .git/hooks/pre-applypatch
-rwxr-xr-x 1 Peter None 1765 Sep 23 15:01 .git/hooks/pre-commit
-rwxr-xr-x 1 Peter None 4412 Sep 23 15:01 .git/hooks/pre-rebase
-rwxr-xr-x 1 Peter None 2027 Sep 23 15:01 .git/hooks/update
-rw-r--r-- 1 Peter None 138 Sep 23 15:02 .git/index
-rw-r--r-- 1 Peter None 165 Sep 23 15:02 .git/logs/HEAD
-rw-r--r-- 1 Peter None 165 Sep 23 15:02 .git/logs/refs/heads/master
-r--r--r-- 1 Peter None 22 Sep 23 15:02 
.git/objects/40/ee2647744341be918c15f1d0c5e85de4ddc5ed
-r--r--r-- 1 Peter None 132 Sep 23 15:02 
.git/objects/58/0cb9f9285080ac8c3efe6d481e0f4dd0adfc0b
-r--r--r-- 1 Peter None 51 Sep 23 15:02 
.git/objects/9f/8348bf5cee2eac05df7755d6dbb82e8844e396
-rw-r--r-- 1 Peter None 42 Sep 23 15:02 .git/refs/heads/master
$ od -t c .git/index
0000000   D   I   R   C  \0  \0  \0 002  \0  \0  \0 001   F 366   c 332
0000020  \0  \0  \0  \0   F 366   c 332  \0  \0  \0  \0   t 020   A 240
0000040  \0 005   ~  \t  \0  \0 201 244  \0  \0 003 355  \0  \0 002 001
0000060  \0  \0  \0  \a   @ 356   &   G   t   C   A 276 221 214 025 361
0000100 320 305 350   ] 344 335 305 355  \0 006   b   o   l   l   o   x
0000120  \0  \0  \0  \0   T   R   E   E  \0  \0  \0 031  \0   1       0
0000140  \r  \n 237 203   H 277   \ 356   . 254 005 337   w   U 326 333
0000160 270   . 210   D 343 226 272 025   >   J 257   Q   e   F   u 036
0000200   ! 201 372 232 361 342   G   -   #   >
0000212
$

Could someone please help me use git on cygwin?  Ah, by the way, I use
DOS line ends on cygwin, i.e., \r\n not \n like on Linux.  Could that be
the problem?  If so, then maybe it's something cygwin git could be aware
of?

Peter K.
------------------------------------------------------------------------
 Peter Klavins                                              Datalon SrL
 klavins@netspace.net.au                   Viale Giuseppe Mazzini 114/A
 Mobile +39 339 801 4246 Fax +39 06 233 297 037     00195 Roma RM Italy


Attachment: smime.p7s
Description: S/MIME cryptographic signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]