Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can anyone explaine why "git status" shows files as modfied when running under a share on linux?

Tags:

git

linux

windows

The files are hosted on a windows machine,, and i was wondering if i cold use my Linux box to manage git, so i mounted the share. And then i see that when doing git status all the files shows as modified, and when trying to push from this share it wont accept my key.

The image is from same snapshot, same folder at same time.

Linux --------------------------------------------------------winGitBash

enter image description here

like image 412
Darkmage Avatar asked Feb 22 '12 22:02

Darkmage


2 Answers

This blog post explains it quite nicely. Basically it is good idea to set:

git config --global core.autocrlf true

like image 197
janheski Avatar answered Sep 30 '22 01:09

janheski


Have you checked your crlf settings on the two machines? One may be re-creating the files as CRLF (Windows) while the other has just LF endings. That would be sufficient for the 'modified' status.

Don't forget your personal settings as well as the repo settings.

like image 41
Philip Oakley Avatar answered Sep 30 '22 01:09

Philip Oakley