0

Sometimes when I want to push to git hub in my Pycharm, I encounter with this error:

Error rebasing
.idea/workspace.xml: needs update You must edit all merge conflicts and then mark them as resolved using git add

If the file is one of my project files, simply I commit it by right clicking on it and choose git\commit. but since 'workspace.xml' is not showing in my project, how can I commit it? is there any way to do that inside Pycharm? if not how to do it from command line?

ehsan shirzadi
  • 4,138
  • 12
  • 57
  • 99

1 Answers1

1

I believe PyCharm automatically should gitignore .idea/workspace.xml and won't show it in the project. You would have to go in the project directory via command line and do a git commit on .idea/workspace.xml.

The problem is you shouldn't have committed that file. That file changes depending on the individual Dev's IDE. So it will be changing clobbering every time you pull.

There are ways to completely remove files from a repo but last time I did it, it was painful.

Clutch
  • 6,774
  • 10
  • 40
  • 54
  • did you use `--cached` option ? cf. https://stackoverflow.com/questions/1143796/remove-a-file-from-a-git-repository-without-deleting-it-from-the-local-filesyste – Blupon Jan 18 '20 at 22:58