Monday, December 10, 2007

Git for Flex Projects

I have been using subversion for Flex2 projects since it was released in 2006. I use the full version because I had problems getting the eclipse plugin to work. But I had other problems with the full Flex2 IDE as well. One problem was there is no facility to exclude files from the build path. So, all of my .svn files get copied from the src folder to bin. Permission problems also don't allow me to do a "clean" through the Flex2 IDE. Bad. Very bad.

So, I have converted all my Flex2 and action script 3 projects to use git rather than subversion. Simple to do, I just exported my adobe subversion branch and ran git init. I added a single .gitignore at the project root to ignore files in all the bin folders. Then I used Flex2 to recompile all the projects and ran git status to verify the ignores. It's all good...

Note: this would have been a bit easier to just use git-svn clone but my mac is missing the perl bindings required for git-svn.

The Git Server
: Next was to create a --bare copy and transfer it to my git server at slicehost. First the clone.
git clone --bare ~/work/adobe adobe.git
touch adobe.git/git-daemon-export-ok
scp -r adobe.git

Then on the server, simply move this to the git directory and fix the permissions.
cd /public/git/
sudo mv ~/adobe.git .
sudo chown -R git:git adobe.git
And test on the client side with the following
and the new project is loaded to the client.
git clone ssh:// adobe
After getting used to git I plan to move all projects there. If I can find the perl hooks, I'll probably use git-svn at least the the older (Sun) projects.

No comments: