Kazi
Kazi

Reputation: 1553

Git checkout shows error in Webstorm

i am in a middle of a project and doing it by webstrome. I just created a branch to add new feature, but whenever i am trying to switch between master to my new branch or new branch to my master, i am getting this problem.. Even i do not change anything in my master or my branch i am still getting this error while changing from master to branch or branch to my master.

here is the error:

error: The following untracked working tree files would be overwritten by checkout:
.idea/workspace.xml
Please move or remove them before you can switch branches.
Aborting

and what is this .idea/workspace.xml is doing here in my project? is it from my webstorm IDE ?

Upvotes: 0

Views: 59

Answers (1)

Nandu Kalidindi
Nandu Kalidindi

Reputation: 6280

Those are probably IDE generate metadata files.

If you don't need any of the untracked files. Do the following.

git checkout . (Discards and changes)

git clean -fd (Removes all untracked/new files)

Or if you don't want to be bothered by this happening again. Just add .idea/ entry in .gitignore file and everything generated under that folder will not be tracked for version control.

Upvotes: 1

Related Questions