Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undo changes is not working, either on Visual Studio or SourceTree

Each time I'm trying to switch branches, but I'm getting the usual error that I need to commit/slash first my changes before doing so. The branch I'm in is the dev, so I don't think I made any changes there. Anyway, I only commit to my own branch the create a pull request.

  1. I've tried to undo the changes by right clicking the file, then select undo changes
  2. Discard on sourcetree
  3. I've tried git checkout .
  4. I've done what it's recommended in this post
  5. I close Visual Studio, delete the local folder, delete the tab on SourceTree, the re-clone the dev clone.

Each time I open SourceTree and/or Visual Studio, I still see that file appSettings.test.json, that I didn't changes, complaining about changes that I need to commit.

I want to have a clean dev on my local.

Thanks for helping

like image 483
Richard77 Avatar asked Jul 23 '18 19:07

Richard77


1 Answers

Stash the changes you want to remove and then drop the stash.

like image 53
zzssrko Avatar answered Oct 01 '22 05:10

zzssrko