i am currently working on windows.
Sometimes i have problems when i try :
git checkout origin develop
i have this error : error: un
I was facing the same issue. If your code is running, Stop it (i.e close the terminal on which npm run *** is working) and close Visual Studio. Re-open it and again run the command git checkout develop . It worked for me.
In my case, I had to run git command with sudo
: sudo git checkout
For me it was that I was running npm run watch
in a linux subsystem (wsl) running it in a normal cmd fixed it.
This was happening to me on linux. I just renamed the folder with the offending file and from the top directory of the checkout ran a git checkout . which solved the problem.
First make sure to run your cmd/terminal as an administrator (right click on cmd.exe icon -> "Run as Administrator")
I had the same issue with a git pull
(using cmder on windows). What worked for me is this:
This will delete your local changes:
hard reset your branch and try again.
$ git checkout origin develop
- (failed)
$ git reset --hard HEAD
$ git checkout origin develop
- (great success!)
If this doesn't work try forcing the checkout:
This will also throw away your local changes
$ git checkout -f origin develop
.
In my case, "npm run dev", for webpack build to my React app was still running with failed to compile error. aborting it with ctrl+c fix it