5

I am currently using github desktop. I tried to discard changes to one of the edited files before making a commit. Github returned 'Failed to discard changes' This file may be in use by another application. (I closed all related applications beforehand).

Any clues as to what could be causing this?

4
  • try restarting the app
    – Roljhon
    Jan 10, 2017 at 18:38
  • I restarted the app. Logged out. Also restarted my computer. No luck. Jan 10, 2017 at 18:47
  • I hope this could help stackoverflow.com/questions/1575682/…
    – Roljhon
    Jan 10, 2017 at 18:53
  • As of now (September 2017), the error message I received after attempting to discard local changes was, "The file couldn’t be saved."
    – user110857
    Sep 29, 2017 at 14:52

1 Answer 1

10

Faced the same problem on Github Desktop, tried a lot of things, but finally got issue fixed by running the following commands from powershell.

git rm --cached -r . git reset --hard

Make sure, you save any uncommitted local changes before running those.

1
  • 1
    This temporarily fixed things for me in that it discarded my uncommitted local changes but I'm still unable to discard changes via the GitHub App
    – user110857
    Sep 29, 2017 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.