Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to Discard Changes

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?

like image 585
PanczerTank Avatar asked Dec 24 '22 21:12

PanczerTank


1 Answers

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.

like image 155
Qasim Avatar answered Jan 19 '23 12:01

Qasim