Thursday, October 23, 2008

gittidy

I had my first run in with git today. After trying to sync an out-of-whack git-svn local repo with github things turned ugly:

git push
error: remote 'refs/heads/master' is not a strict subset of local ref 'refs/heads/master'. maybe you are not up-to-date and need to pull first?
error: failed to push to 'git@github.com:gunark/rubycas-server.git'

Turns out that remotely deleting the master branch on github (as described here) and then recreating it fixed the problem:

git push origin :heads/master
deleting 'refs/heads/master'
Everything up-to-date
git push origin master
updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   6dd64b1b025c324d0b287805d6c18183b9f20b9e
Generating pack...
Done counting 1395 objects.
Deltifying 1395 objects...
 100% (1395/1395) done
Writing 1395 objects...
 100% (1395/1395) done
Total 1395 (delta 960), reused 0 (delta 0)

Yay

There was some weirdness in the github project page after this, but performing another commit and push seems to have taken things back to normal.

3 comments:

Anonymous said...

Are you going to make git repository mainline for rubycas-server? Or it's just experiments around svn mirroring?

Matt Zukowski said...

Yes. git will become the mainline repository for RubyCAS-Server. I've held off for now until I get a bit more used to working with git.

Anonymous said...

nice! git is much better than svn :)