Git – renormalizing a repository

git rm --cached -r .# Remove everything from the index.

git reset --hard# Write both the index and working directory from git's database.

git add .# Prepare to make a commit by staging all the files that will get normalized.
# This is your chance to inspect which files were never normalized. You should 
# get lots of messages like: "warning: CRLF will be replaced by LF in file."

git commit -m "Normalize line endings"# Commit
Advertisements
This entry was posted in Git, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s