Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (29.3k points)

Using PHPStorm, I am trying to ignore the workspace.xml which pops up every-time I try to make a git commit.

My .gitignore looks like:

/.idea/

.idea/workspace.xml

Because at a point the file was committed, I've also executed:

git rm --cached .idea/workspace.xml

and then committed the removal, pushed to a bare repo.

But the file keeps popping up later when I do changes in the project.

Any ideas on what I am missing?

1 Answer

0 votes
by (50.2k points)

Here, you need to do:

1.remove the file from git

2.push the commit to all remotes

3.make sure all other committers updated from remote

Commands you need to use:

git rm -f .idea/workspace.xml

git remote | xargs -L1 git push --all

But the other committers however working on it should run:

git pull

Thus, you can ignore your  idea/workspace.xml.

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...