Frage

I'm new to git and already in love with it. so I'm doing lots of projects in PHP using PhpStorm, I got my own framework that I developing, And now thanks to git I can control versions in my system.

My problem is that I made some core changes on one project which is relatively similar some other project and I wanted to take those changes to that other project so I made a patch from my last 2 commits.

when I try to apply the patch I get these messages:

error: patch failed: .idea/workspace.xml:5
error: .idea/workspace.xml: patch does not apply

I was running this command:

git apply --check 0001-changed-only-the-urlnames-from-non-category-creation.patch 

Is there a way I could make the patch apply?? this is pretty important to me.

Thank you !

War es hilfreich?

Lösung

I would add .idea directory to .gitignore file (and exclude it from patch as well).

Normally it is not what you want to keep in repository, especially if one day another developer using IDEA will join your project.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top