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

All files marked as edited after fresh git clone #37

Closed
gep13 opened this issue Dec 21, 2014 · 14 comments
Closed

All files marked as edited after fresh git clone #37

gep13 opened this issue Dec 21, 2014 · 14 comments

Comments

@gep13
Copy link
Member

gep13 commented Dec 21, 2014

ok, what has changed with this repository...

I have just done a fresh git clone, and immediately all 358 files are marked as changed:

image

I haven't changed anything in my git configuration, so something must have changed in this repository, unless anyone can think of something else.

What do we need to add to the gitattributes file to solve this problem? I can only assumed that the issue is to do with line endings, when shared between *nix and windows.

@Redsandro @TomOne @ferventcoder

@TomOne
Copy link
Contributor

TomOne commented Dec 21, 2014

Sorry, I think it was my mistake. I forgot to clone and commit after adding the .gitattributs file. I just did a fresh clone and commited the EOL. Now it should be OK.

I think #35 (comment) is also related to this issue.

@ferventcoder
Copy link
Contributor

Git config --global core.autocrlf false

That setting is required for choco repos (you can omit the global if you
prefer to set it on each repo).

Second setting is repo specific
git config core.filemode false

On Sunday, December 21, 2014, Gary Ewan Park notifications@github.com
wrote:

ok, what has changed with this repository...

I have just done a fresh git clone, and immediately all 358 files are
marked as changed:

[image: image]
https://cloud.githubusercontent.com/assets/1271146/5519753/1b532418-8959-11e4-90ad-947a43397264.png

I haven't changed anything in my git configuration, so something must have
changed in this repository, unless anyone can think of something else.

What do we need to add to the gitattributes file to solve this problem? I
can only assumed that the issue is to do with line endings, when shared
between *nix and windows.

@Redsandro https://github.com/Redsandro @TomOne
https://github.com/TomOne @ferventcoder
https://github.com/ferventcoder


Reply to this email directly or view it on GitHub
#37.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@ferventcoder
Copy link
Contributor

In other words I prefer no magic.

@ferventcoder
Copy link
Contributor

This is open to conversation but the solution needs to work against Windows and *nix at the same time in the same working set. To help you understand what I mean - in a VM and out of a VM using it as a shared folder.

If you have a good answer for that other than what I use above, I'm all ears.

@gep13
Copy link
Member Author

gep13 commented Dec 21, 2014

Git config --global core.autocrlf false

This I already had. Didn't have the second setting, so will keep that in mind.

@gep13
Copy link
Member Author

gep13 commented Dec 21, 2014

@TomOne

. Now it should be OK.

Nope, just did a re-clone. Although things are "better" I am still seeing immediately 277 changes.

@gep13
Copy link
Member Author

gep13 commented Dec 21, 2014

If I use:

Git config --global core.autocrlf true

Then is works fine. But that goes against what @ferventcoder is recommending. How should we proceed?

@ferventcoder
Copy link
Contributor

It's actually not a recommendation. ;)

On Sunday, December 21, 2014, Gary Ewan Park notifications@github.com
wrote:

If I use:

Git config --global core.autocrlf true

Then is works fine. But that goes against what @ferventcoder
https://github.com/ferventcoder is recommending. How should we proceed?


Reply to this email directly or view it on GitHub
#37 (comment)
.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@gep13
Copy link
Member Author

gep13 commented Dec 21, 2014

It's actually not a recommendation. ;)

Ha ha! Ok, so what do we need to do to fix this. If I use core.autocrlf false and do a clone of the repository, there are immediately 277 files different. If I use core.autocrlf true things are good to go.

What needs to happen to the files in the repository to make everyone happy?

@TomOne
Copy link
Contributor

TomOne commented Dec 21, 2014

@ferventcoder, 👍 for git config --global core.autocrlf false, but we cannot expect that all users have this setting. Therefore it’s better to set it in .gitattributes to disable it repo-wide for all users. This should do it: 6a805f3.

@gep13 after I made 6a805f3 I don’t have the issue of changed files after a clone anymore. Can you confirm that?

@TomOne
Copy link
Contributor

TomOne commented Dec 21, 2014

@ferventcoder

It's actually not a recommendation. ;)

But I would recommend it. I don’t understand folks who recommend to set autocrlf to true. That setting could break files which need a specific EOL.

@ferventcoder
Copy link
Contributor

Ha, what I meant was - with all chocolatey repos you can expect that they
are autocrlf false, so whether you set it globally or per repo, its easy to
know what setting you are expected to have if you come to chocolatey to
contribute. :)

On Sunday, December 21, 2014, TomOne notifications@github.com wrote:

@ferventcoder https://github.com/ferventcoder

It's actually not a recommendation. ;)

But I would recommend it. I don’t understand folks who recommend to set
autocrlf to true. That setting could break files which need a specific
EOL.


Reply to this email directly or view it on GitHub
#37 (comment)
.

Rob
"Be passionate in all you do"

http://devlicio.us/blogs/rob_reynolds
http://ferventcoder.com
http://twitter.com/ferventcoder

@Redsandro
Copy link
Contributor

This sounds just like #35 (comment)

-edit-

@TomOne already said the same. Sorry I'm late to the party. PS - gonna go on holiday. Be back next year. :)

@gep13
Copy link
Member Author

gep13 commented Dec 22, 2014

I have just tried again, and looks like it is now all good.

When I last tried, it was with this commit from @TomOne and things still weren't working, but now they are.

Thanks

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

4 participants