threads / discuss / 13338

Files need updating following a clone?

Subject: Files need updating following a clone?

## tl;dr

4 messages between Apr 30, 2008 and May 1, 2008.

replies: 3people: 3as markdown or json

edpark· Apr 30, 2008, 23:12 UTC · lore

This is really strange and I'm wondering if anyone here can help me out.

I just cloned a remote repository and when I execute a 'git status' right after it says that some files need to be updated:

utsd.txt:   needs update

If I just cloned a remote repo how did these files get modified? How can I make git realize that these files aren't modified? Further, if I clone to a different machine then the git on that machine doesn't indicate that any files were modified (??).

Thanks in advance!
Matt Graham· May 1, 2008, 00:32 UTC · re: edpark · lore

Re: Files need updating following a clone?

On Wed, Apr 30, 2008 at 7:12 PM, edpark <edpark@gmail.com> wrote:
Show 12 quoted lines
> This is really strange and I'm wondering if anyone here can help me
>  out.
>
>  I just cloned a remote repository and when I execute a 'git status'
>  right after it says that some files need to be updated:
>
>  utsd.txt:   needs update
>
>  If I just cloned a remote repo how did these files get modified?  How
>  can I make git realize that these files aren't modified?
>  Further, if I clone to a different machine then the git on that
>  machine doesn't indicate that any files were modified (??).

What systems are you using? Someone recently posted a probably unrelated issue when mixing macs and windows. http://article.gmane.org/gmane.comp.version-control.git/80548/match=mac+modified

edpark· May 1, 2008, 00:54 UTC · re: Matt Graham · lore

Re: Files need updating following a clone?

Hi Matt, thanks for pointing that out. Yes, it turns out that we are using different systems. The original commit (to Github.com) was on a Mac but then there were a few commits made from a Windows based system (through Parallels). It's only on a windows based system that Git will claim that files need to be updated; this doesn't happen on a Mac. Hope this helps someone figure out what's going on ..

On Apr 30, 5:32 pm, "Matt Graham" <mdg...@gmail.com> wrote:
Show 20 quoted lines
> On Wed, Apr 30, 2008 at 7:12 PM, edpark <edp...@gmail.com> wrote:
> > This is really strange and I'm wondering if anyone here can help me
> >  out.
>
> >  I just cloned a remote repository and when I execute a 'git status'
> >  right after it says that some files need to be updated:
>
> >  utsd.txt:   needs update
>
> >  If I just cloned a remote repo how did these files get modified?  How
> >  can I make git realize that these files aren't modified?
> >  Further, if I clone to a different machine then the git on that
> >  machine doesn't indicate that any files were modified (??).
>
> What systems are you using?  Someone recently posted a probably
> unrelated issue when mixing macs and windows.http://article.gmane.org/gmane.comp.version-control.git/80548/match=m...
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Avery Pennarun· May 1, 2008, 01:07 UTC · re: edpark · lore

Re: Files need updating following a clone?

On 4/30/08, edpark <edpark@gmail.com> wrote:
Show 7 quoted lines
> Hi Matt, thanks for pointing that out.
>  Yes, it turns out that we are using different systems.  The original
>  commit (to Github.com) was on a Mac but then there were a few commits
>  made from a Windows based system (through Parallels).
>  It's only on a windows based system that Git will claim that files
>  need to be updated; this doesn't happen on a Mac.
>  Hope this helps someone figure out what's going on ..

You probably have files checked into your tree with windows-style CRLF instead of unix-style LF line endings, and git for Windows nowadays has "git config --global core.autocrlf true" set.

If you configure your windows autocrlf setting to false, this particular symptom will go away, but you probably want to actually fix the files in the repo so they don't have CRLF problems. You might be able to do that just by doing "git commit -a".

Good luck,
Avery

← back to recent threads