Using Git With FogBugz for Local Repositories
Note that this article is intended for developers and may not be of interest to a wider audience
If you, like me, have migrated from using Subversion to Git, you may be missing the ability to link commits with FogBugz cases. I have adapted the Subversion integration post commit hook to work with Git.
It should be noted that integration with repositories hosted on GitHub can be found by clicking on this link, to appropriately enough, GitHub (via a blog post on FogBugz). These instructions are for use with local repositories.
I have simply taken the Subverson integration script, that is available at this link on the FogBugz website and adapted it for use with Git.
To use, follow the instructions below:
- Install Perl in the unlikely situation that it is not already installed on your system
- Install wget. On Mac OS X, you can install via MacPorts by simply typing
sudo port install wgetin a Terminal window. - Download post-commit and logBugDataGit.pl by clicking on this link to GitFogBugz.zip
- Unzip the archive and copy the two scripts to your [Path To Project]/.git/hooks directory and make sure they are both executable
- Edit logBugDataGit.pl as follows:
- If you are using the free FogBugz version set
$BUGZ_URL_FINALtohttps://yourdomain.fogbugz.comand set$IS_TRIALto 1. - If you host your own FogBugz installation, set
$BUGZ_SERVERto your domain without http:// and set$IS_TRIALto 0.
- If you are using the free FogBugz version set
That’s it, there is not step 6!



