Move some git/grit code over from experiments.rb