GithubHelp home page GithubHelp logo

Can't discard changes about desktop HOT 3 CLOSED

SeanOBrien2702 avatar SeanOBrien2702 commented on June 24, 2024
Can't discard changes

from desktop.

Comments (3)

SeanOBrien2702 avatar SeanOBrien2702 commented on June 24, 2024

I have tried on another machine with the same issue. I also tested other repositories and I am not having any problems.

from desktop.

steveward avatar steveward commented on June 24, 2024

Thanks for the issue @SeanOBrien2702. I'm seeing this in the log file, which aligns with what you're saying:

2024-06-14T21:24:08.350Z - error: [ui] `git -c credential.helper= checkout --progress main --recurse-submodules --` exited with an unexpected code: 1.
stderr:
error: Your local changes to the following files would be overwritten by checkout:
	Assets/Hisa Cube Animal/Sprites/Sprites 1.0 & 1.1/Catz_Rabbit_2.png
Please commit your changes or stash them before you switch branches.
Aborting

(The error was parsed as 38: Unable to switch branches as there are working directory changes which would be overwritten. Please commit or stash your changes.)

Is there any other application that has these files open?

If you want to try forcing a discard from the command line you can run git checkout -- <path/to/file>. If you want to force a discard for **all** files you can run git reset --hard HEAD`. Let me know if either of those commands causes the same issue you are experiencing in Desktop.

from desktop.

SeanOBrien2702 avatar SeanOBrien2702 commented on June 24, 2024

The fixed the issues. I believe the issue was something related to end line differences. I changed my .gitattributes file according to the recommendations in the Handle Line Endings "Get Started" page. I had to reimport the files into the project but I am no longer running into the issue.

from desktop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.