Git outta here
Git has been my choice of version control systems for a while now, after using SVN for a long time. Its a great tool but does have some fun quirks that cause me some headaches from time to time.
The primary one is the 100Mb file limit when committing files. When the commit is made with a +100Mb file, the entire commit fails. What I think should happen is skipping that large file, logging and reporting back to the committer that the file had been skipped. When using the command line, Git tells you what file failed, when using the GitHub for Mac tool, it simply reports that one file was too large without naming the file. I’ve created a ticket with Git (as have others) to have this adjusted.
However, this problem leaves you with a large file in the commit history, even if you delete it with a local commit before pushing to Github. So after some googling and playing around, I found this post on StackOverflow that allows me to remove the large file from the commit history.
git filter-branch –index-filter ‘git rm -r –cached –ignore-unmatch <file/dir>’ -f HEAD
This is important because I’ve inherited some +400 sites at my new (sort of) job. These sites range from OSCommerce to WordPress to Zend, to custom PHP code / frameworks. Some are ancient, dating back to 2007, other are more recent but almost have the live code not matching the source code available on the local servers. So to add some command and control to the whole development cycle, I’ve instituted Git and a new work flow to mitigate some of the issues with keeping the code based in sync.