A lifehack for such situation I just invented and tried (that works perfectly):
git add .
git reset --hard HEAD
Your privacy
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.