Aniruddha
Aniruddha

Reputation: 3327

Issues initializing repository in existing directory

I have created a Rails app and now was trying to initialize repository in current project folder by following these guidelines - http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository

However, on executing command

git init

I'm getting following error -

fatal: bad config value for 'core.safecrlf' in /Users/aniruddhabarapatre1/.gitconfig

Upvotes: 0

Views: 70

Answers (1)

Chris
Chris

Reputation: 8656

From the chat we had in the comments, it seems like your core.safecrlf was set to input, which doesn't appear to be a valid option for that setting.

Valid values for the The safecrlf setting include true, false, and warn (unless I've missed any).

From the documentation:

core.safecrlf - If true, makes git check if converting CRLF is reversible when end-of-line conversion is active. Git will verify if a command modifies a file in the work tree either directly or indirectly. For example, committing a file followed by checking out the same file should yield the original file in the work tree. If this is not the case for the current setting of core.autocrlf, git will reject the file. The variable can be set to "warn", in which case git will only warn about an irreversible conversion but continue the operation.

Hope that helps.

Upvotes: 1

Related Questions