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

Unstaged changes #1228

Closed
alrra opened this issue Feb 23, 2014 · 4 comments
Closed

Unstaged changes #1228

alrra opened this issue Feb 23, 2014 · 4 comments

Comments

@alrra
Copy link
Contributor

alrra commented Feb 23, 2014

This is kinda weird, but after cloning Modernizr, I get some unstaged changes:

I'm using git v1.9.0 on Mac OS X.

@stucox
Copy link
Member

stucox commented Feb 23, 2014

Very strange, although I can’t reproduce it on Mavericks on my Macbook Air, tried git v1.7.12.1 and v1.8.4.3 (Homebrew hasn’t got v1.9.0 yet), both HTTPS and SSH.

Don’t know what to suggest…

@drublic
Copy link
Contributor

drublic commented Feb 23, 2014

I get the same issue as @alrra.
I think this might be connected to a line break issue.

To fix this, please run the following commands:

git rm --cached -r .
git reset --hard
git add .

and commit all changes (which should be exactly this one file as seen in @alrra's comment).

You might want to add a .gitattributes files to the repository in order to prevent issues like this beforehand. Please see this help page.

@alrra
Copy link
Contributor Author

alrra commented Feb 23, 2014

@stucox thanks for testing (btw, I had this issue, even before I've updated to v1.9.0).

Homebrew hasn’t got v1.9.0 yet)

@stucox It has (see: Homebrew/legacy-homebrew#26734).

@alrra
Copy link
Contributor Author

alrra commented Feb 23, 2014

line break issue

@stucox, @drublic is right, that is exactly the problem.

add a .gitattributes files to the repository in order to prevent issues like this beforehand.

👍

patrickkettner added a commit that referenced this issue Feb 24, 2014
Fix line ending issue described in #1228
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
Setting text=auto will ensure line endings to be normalized to LF.
This prevents changed files on different systems after cloning the
project.

Reference Modernizr#1228.
Closes Modernizr#1231.
patrickkettner pushed a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
This commit resolves the issue described in Modernizr#1228, and thus,
eliminates the problem where users on platforms with a different
native line ending, get unstaged changes.

Close Modernizr#1228.
patrickkettner added a commit to patrickkettner/Modernizr that referenced this issue Feb 22, 2015
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

3 participants