git command of the day: #8

Author: Jeff Anderson

git update-server-info

I haven't forgotten about doing the git command of the day, I just haven't done it in a while.

While trying to clone a git repsitory on my bluehost account, I found that I couldn't use ssh nor the git protocol. I decided that it shouldn't be too unreasonable to expect to be able to clone a git repository over http. It is very much possible, but the http protocol isn't a very friendly place to try to implement the git protocol. The git protocol involves pack generation. A client requesting a file over http can't request that the pack be generated in the same way it would over the native git protocol. git update-server-info stores enough information in the repository to get the ball rolling for the client. It must be run any time the bare repo is updated. When the git client goes to clone or fetch over http, it will check this cached result, and have a starting point to work from.

Posted: Feb 11, 2009 | Tags: git

Comments are closed.