如何在Pycharm中提交.idea/workspace.xml [英] How to commit .idea/workspace.xml in Pycharm

查看:124
本文介绍了如何在Pycharm中提交.idea/workspace.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时候我想在我的Pycharm中推送到git hub时,遇到此错误:

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

如果该文件是我的项目文件之一,那么我只需右键单击它并选择git \ commit即可提交它.但是由于'workspace.xml'没有显示在我的项目中,我该如何提交它?有没有办法在皮查姆做到这一点?如果没有,如何从命令行执行该操作?

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?

推荐答案

我相信PyCharm会自动gitignore .idea/workspace.xml,并且不会在项目中显示.您将必须通过命令行进入项目目录,并在.idea/workspace.xml上执行git commit.

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.

问题是您不应该提交该文件.该文件会根据各个开发人员的IDE进行更改.因此,每次您拉动时,它都会改变垃圾的内容.

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.

这篇关于如何在Pycharm中提交.idea/workspace.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆