0

Possible Duplicate:
git replacing LF with CRLF

I have a Django project which I would like to collaborate and work on it with my team. I am very new to git and would like to know how to set it up.

I have cd into the project directory and did 'git init'

but when I try staging it with 'git add .', it gives an error 'LF would be replaced by CRLF in crush/admin.py'. What should and I do about it and how do I move forward. Please help.

Thanks.

Community
  • 1
  • 1
NazimZeeshan
  • 615
  • 1
  • 7
  • 12
  • Please title and tag your question correctly when you ask, this has nothing to do with Django, but rather with git. – casperOne Dec 22 '11 at 13:45

1 Answers1

1

The specific error you are getting is because your line endings are not uniform; this usually happens when you shift between systems (Windows and Linux use different line endings). If you are interested in this, you can read the wikipedia entry, which also includes options on making sure your entries are uniform. You can actually go ahead with it and git will make sure all your files have the same newline character combination.

As far as familiarity with git, these two links should give you all you need:

  1. Git for beginners
  2. A git branching model (although I am not a big git user, this really helped me understand how branching should work)
Community
  • 1
  • 1
Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284
  • thanks, how do I make those line endings uniform? – NazimZeeshan Dec 22 '11 at 07:56
  • git will do it for you (that's why it a warning message). The best practice is to make sure your editor saves all files with your preferred line ending. `LF` (also called "UNIX" in some editors) is preferred as it is more universal, where as `CRLF` is Windows-only. – Burhan Khalid Dec 22 '11 at 08:06