Git integrity problem

I was wondering what happened if I mix git with linux with windows. In any case, I made a commit ("first") on linux, and then modified the file in windows and committed there. This did not allow me, because the end of the line and the patch looked suspicious. So I tried from linux and it did not let me and ...

I did git reset --hard . Files look like they were dumped. However, when I execute git status, it shows them all as modified. git commit -a -m "test" causes the same problem. The git status shows all changes. However git clone . creates a subdirectory, and when I go there and write down the git status, none of them will be changed.

Even if his problem is with a timestamp, why can't I confirm it and what's wrong? Right now, a simple solution would be to move the current directory and make a new clone on it. But I would like to understand what is happening.

+4
source share
1 answer

I'm not sure if this answers your question exactly, but I use git (with svn as the backend hosted on linux) on windows, and my colleagues use git on mac. I use git Extensions as my git client window, and it tells me when it changes the default line endings added by windows, We did not encounter any conflicts regarding line endings. In Global Preferences and Local Preferences, I did not specify anything about how to handle line endings, so it seems that the default behavior takes care of all this.

+1
source

Source: https://habr.com/ru/post/1336575/


All Articles