Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7794013
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:40:09+00:00 2026-06-01T22:40:09+00:00

I have cloned a git repository on Windows and noticed that the line endings

  • 0

I have cloned a git repository on Windows and noticed that the line endings are set to UNIX style (LF).

To fix it, I changed the repository’s autocrlf value to true (core.autocrlf=true).

However, all of my checkout out files on disk are still have UNIX style (LF) line returns. How can I fix them?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:40:10+00:00Added an answer on June 1, 2026 at 10:40 pm

    WARNING: Performing the below commands will cause you to lose any uncommitted changes.

    To fix the line endings on your checked out files you will need to issue two commands:

    1. git rm --cached -r . This removes everything from git’s index.
    2. git reset --hard HEAD This resets all local changes.

    If you have pending changes, the task becomes much more difficult.

    You can use the dos2unix command that comes with msysgit to try fix and the line endings on the files you’re trying to commit.

    Once you have managed to commit any changes you need to preserve, you can use the two above mentioned commands to reset the line endings for all the files in the respository.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully cloned Git repository in Jenkins over Git/SSH on Windows 2008 32-bit.
I have a remote git repository and I have cloned one branch git clone
I have cloned a remote SVN repository with git-svn. I have modified a pom.xml
I have a git repository on unfuddle.com. I've been working locally on my windows
I have cloned my git repository over ssh. So, each time I communicate with
I have cloned a Git project into a local Git repository. Then I have
I cloned a Git repository from Windows using msysgit (v1.7.7) on a network drive.
I have cloned a git repository to my dev server and then switched to
I have a Git repository. I have cloned the repository and can commit my
I have a local Git repository on my computer that I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.