I decided to embrace distributed version control. I’ve been using Mercurial a little because of the Cocotron project on Google Code. But since git support is built in to Xcode 4, I decided to use git for my own projects so that I’ll be ready on the day when I switch to Xcode 4. I had already set up a Subversion server on my development machine at work, so I figured setting up a git server wouldn’t be too difficult. For the most part it wasn’t, but there were a couple stumbling blocks that I’m going to document here to help others trying to do the same thing (and my future self when I need to set up a git repository on another machine).
My need is for a repository server on a local LAN where I’m not worried about malicious users. So I don’t need to concern myself with access over the Internet or ssh. Here’s what I did:
git init git add . git commit
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>git</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/git</string>
<string>daemon</string>
<string>--export-all</string>
<string>--base-path=/Users/Shared/git</string>
</array>
<key>ServiceDescription</key>
<string>git Version Control System</string>
</dict>
</plist>
git clone git://machinename.local/projectname projectFolderName
git commit -a
git pushgives the error:
fatal: The remote end hung up unexpectedly
--enable=receive-packSo now git.plist looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>git</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/opt/local/bin/git</string>
<string>daemon</string>
<string>--export-all</string>
<string>--base-path=/Users/Shared/git</string>
<string>--enable=receive-pack</string>
</array>
<key>ServiceDescription</key>
<string>git Version Control System</string>
</dict>
</plist>
To get this change to take effect, either reboot or execute the following commands in Terminal:
cd /Library/LaunchDaemons sudo launchctl stop git sudo launchctl unload git.plist sudo launchctl load git.plist
! [remote rejected] master -> master (branch is currently checked out)
git config --bool core.bare trueThen hold breath while deleting all files except .git directory in repository folder
Some helpful links:

It’s called The Universal Steve because all four guys in the band are named Steve. We aren’t really all that active at the moment, but I’m proud of the two albums we produced.
It’s been one year since adding the Corpse Reviver to our regular rotation. We first heard about it from ranger Dean Shenk on a guided history walk at Yosemite. He said he had seen a nineteenth century menu from a long-gone Yosemite Valley bar. Two drinks that caught his eye were the Corpse Reviver and Samson With the Hair On. The Corpse Reviver wasn’t too hard to dig up, but I haven’t been able to find Samson With the Hair On.
So now I have a bricked iPhone. iTunes gave me error code 1611. Something similar happened with 4.2.1 but I was able to get around it by using Xcode to restore back to 4.2. At some point I had a 4.2 beta version installed and that seemed to screw things up. Now when I try to restore 4.2.1 or 4.2 Xcode says the device isn’t eligible for that version. When I try to restore 4.3, Xcode starts the restore, I get the Apple logo and a progress bar on the screen, Xcode says “Waiting for Device” and then after a while, the iPhone screen flashes white and the whole thing starts all over.
I drove the hour to the Apple store in Roseville and went to the Genius bar, but all he did was try to install 4.3 with iTunes, get the same error number, and say there was nothing more he could do and that I could replace the phone for $199.
I’ve read some stuff about getting the phone into DFU mode. Here’s a tip. Start Xcode and open Console when trying to get into DFU mode. When it sees a device in DFU mode, Xcode writes the message “DFU device attached” to the Console. I’m going to play around with that some more and see if I have any luck. If not, I guess it’s time to look into jailbreaking.