Kubuntu / Windows 7 dual boot and git

I have been using Kubuntu and Windows 7 on my laptop for some time now. I recently also started using git to keep track of the project I am working on. I first decided to use the same git repository for editing from Kubuntu and Windows, but soon found that a change on Windows would make git on Kubuntu, I think all files have changed since the last commit, although the change does not seem to be related to content ... The same happens if I do a commit on Kubuntu and immediately after that I do a git status on Windows.

I know I can use different repos for Kubuntu and Windows and just merge them together when done, but if anyone knows how I can use the same repo I would really appreciate the help.

+2


source to share


2 answers


Maybe it has to do with line termination or character encoding? Are you using unix and utf-8 line endings in both editors?



+2


source


Ok, it just so happened that it was a line ending issue. It seems to have been related to the core.autocrlf git has option, which, if enabled, changes the line endings in the repository. I just forgot to enable this option. If you need troubleshooting information, this should help you: http://help.github.com/dealing-with-lineendings/ . You can also check the documentation on git-config (1) to see what exactly the core.autocrlf parameter has



+1


source







All Articles