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 8188261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:50:52+00:00 2026-06-07T02:50:52+00:00

After git reset –hard , git status gives me files within the Changes not

  • 0

After git reset --hard, git status gives me files within the Changes not staged for commit: section.

I’ve also tried git reset ., git checkout -- . and git checkout-index -f -a, to no avail.

So, how can I get rid of those unstaged changes?

This seems to hit only Visual Studio project files. Weird. See this paste: http://pastebin.com/eFZwPn9Z. What is special with those files, is that in .gitattributes I have:

*.sln        eol=crlf
*.vcproj     eol=crlf
*.vcxproj*   eol=crlf

Also, autocrlf is set to false in my global .gitconfig. Could that be somehow relevant?

  • 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-07T02:50:54+00:00Added an answer on June 7, 2026 at 2:50 am

    Okay, I’ve kind of solved the problem.

    It seemed that the .gitattributes file, containing:

    *.sln        eol=crlf
    *.vcproj     eol=crlf
    *.vcxproj*   eol=crlf
    

    made the project files appear unstaged. I am clueless why that is, and I’m really hoping that someone privy to the ways of git will give us a nice explanation.

    My fix was to remove these files, and to add autocrlf = false under [core] in .git/config.

    This does not amount to exactly the same thing as the previous configuration, as it requires every dev to have autocrlf = false. I’d like to find a better fix.

    EDIT:

    I commented the incriminating lines, uncommented them and it worked. What the … I don’t even … !

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

Sidebar

Related Questions

After a hard reset of my laptop that freezed after a git commit, I
After git init , I added and committed a few files, made some changes,
I messed up with git after running git reset --hard HEAD~3 and lost 2
I had a mistake and commit some changes to git which I should not
After git pull I have done git reset hard to undo the merge with
My post commit hook is not running after git. I have verified that the
I lost some code after running git reset --hard HEAD and I never committed
How does one revert a remote git repo after a reset done locally? We
After a Git pull, its output gives a summary on the change amount. How
I would like to inspect any code changes after doing a git pull .

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.