Ehud,
We do the same thing that Rohit suggests for our packages. You can execute his line of code or change the setting in Options Inspector in the Format menu.
We also use GIT to manage revisions. We include the generated m files and the regular notebooks and other docs in the repo (its not pretty because they are messy files but it makes it easy to pull complete versions -- you just need to control your git diff commands so you only look at .m files to see simple changes.)
One thing we did is we made a notebook called "RunMe.nb". When you pull the git repo, you execute the RunMe.nb file and it moves everything into the right place. Here is an example (slightly modified with bogus directory names) to show you how it works. We have some unrelated bin files and some stylesheets that we wanted to move as well (we gave them names starting with "StyleSheet"). We also compiled some unrelated code but I cut out that section of the RunMe.nb file. Beware: We terminate the kernel at the end so it does not affect anything we are doing. Our workflow is we make sure MMA is closed, pull the repo, run the RunMe.nb and get to work! The nice thing with this file is it works on anyones machine so if you pull a fresh copy of the repo, everything installs properly. I am noticing now that we wrote the code for Macintosh computers, but A Mac and Windows compatible version would require a minor edit to the way we assemble the directory paths (like adding OperatingSystem option to FileNameJoin, etc.)
PrintTemporary["Getting files to copy..."];
ackFilePaths =
FileNames[{"*.bin", "*.m"},
StringJoin[NotebookDirectory[], #] & /@
{"", "myDir1",
"myDir2", "myFunctions1"}];
styleSheetFiles =
FileNames[{"Stylesheet*.nb"}, NotebookDirectory[] <> "myFunctions1"];
PrintTemporary["Copying files to $UserBaseDirectory..."];
MapThread[
CopyFile[#1,
FileNameJoin[{$UserBaseDirectory, "Applications/" <> #2}],
OverwriteTarget -> True] &,
{ackFilePaths, Map[FileNameTake[#] &, ackFilePaths]}];
MapThread[
CopyFile[#1,
FileNameJoin[{$UserBaseDirectory,
"SystemFiles/FrontEnd/StyleSheets/" <> #2}],
OverwriteTarget -> True] &, {styleSheetFiles,
Map[FileNameTake[#] &, styleSheetFiles]}];
PrintTemporary["Done"]; Pause[1];
Exit[];
Let me know if this is helpful.
Regards,
Neil