Subject: Re: Copying Git repository from Linux to Windows.

From: Jakub Narebski <[email-masked]>
Date: Wed, 15 Jun 2011 03:40:23 -0700 (PDT)

viresh kumar <[email-masked]> writes:

> I wanted to copy my complete Linux GIT repo from Linux PC to Windows. I also wanted everything
> related to remote branches too, so need to copy and clone and fetch wouldn't work.
> 
> I don't have windows on same network, so i need to copy to memory stick and then to Windows PC.
> 
> After completing copy operation on mem stick, i found something strange.
> - git branch shows correct results and is exactly same of state at Linux machine.
> - git log is also fine.
> - git status, shows me a lot of files are modified, which is not present in Linux.

That is probably because stat information is stale... or stat
information doesn't work.  Does second "git status" still show files
as modified?

> - git reset --hard also doesn't work and fails with following error.
> 
> 
> $ git reset --hard HEAD
> error: unable to create symlink arch/microblaze/boot/dts/system.dts (Operation not permitted)
> Checking out files: 100% (36696/36696), done.
> fatal: Could not reset index file to revision 'HEAD'.

Try setting `core.symlinks` to false, or just try

 $ git -c core.symlinks=false reset --hard HEAD

Notice that your repository includes symlinks.

BTW. what filesystem do you use?

-- 
Jakub Narebski
Poland
ShadeHawk on #git