Thursday, January 15, 2009

using git for symfony and svn for plugins

I am using git to handle my symfony projects. But symfony plugins is handled thru svn and i have written several of them. Unfortunatly both don't live well together because git refuses to add empty directories and svn got several of them.

One trick is to workaround this git limitation is to add an empty .gitignore in the empty directory. This doesn't affect svn and the directory is no more empty from git's point of view. Here is the bash one-liner to create this .gitignore, to be run from the project root directory.

find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;

0 comments:

Share/Save/Bookmark