Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing between Linux and Windows can run into trouble with line endings #4

Open
tillberg opened this issue Jul 9, 2015 · 0 comments

Comments

@tillberg
Copy link
Owner

tillberg commented Jul 9, 2015

If you sync a git repo between a linux machine and a windows machine, gut and git can have competing agendas in regard to line endings. If autocrlf is off for a git repo but on for the gut repo, for example, then gut would create a different version of the file when syncing remote changes (e.g. maybe you did git pull on a synced linux machine) as opposed to performing the git operation locally (e.g. git pull on the windows machine).

I'm not really sure what a frustration-free solution looks like, or if there is one. On the bright side, when I didn't muck with the autocrlf settings of either git or gut, I only saw this once and haven't been able to reproduce yet. But on the not-so-bright side, git/gut handle unchanged-except-for-line-endings files very poorly; I got into a situation where I had "modified" files but git reset --hard and git stash, etc, did nothing, and those working directory changes were just stuck there (note: they also had stuck file mode changes, from 0755 to 0644, as I was diagnosing #3 at the time).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant