Git: not always very funny...
Okay, I have a use case which I think shouldn’t be too hard. Jean-François, my Montreal on Rails buddy, gave me a good hand, but I think there’s some interaction going on between Github and git-svn that causes friction…
I have a new project which I want to track using Git, but I also want to keep a push-only Subversion repository on Rubyforge.
So, I started like any old project:
Then, I imported that into a fresh Git repository:
I then started coding and commiting using Git. All was well, and I was happy. Then, I pushed to Subversion, like any good developer should:
That worked well enough. Then, I was ready to have a public Git repository. I went to Github, where I have an account, and created a new repository. I then did:
That gave me a couple of errors:
After some discussion with Jean-François, he told me to have a separate branch on which to do development, and merge to master when I am ready to dcommit. So, I did:
That works well enough. Now I want to push my mainline to Github. So I do:
Great! It works. Except… The repository page on Github still shows I need to create the repository. Just for fun, without doing anything else I created a new empty Git repository, touched README, added that, remoted Github and pushed. Voilà, Github showed me the repository, with README being added.
Can anyone shed some light on this ? Here’s a reproduction recipe:
And here’s a sample bash +x run:
February 28th, 2008 at 04:27 AM
Jump in the #github IRC room sometime and let’s chat. This is indeed a valid bug.
February 29th, 2008 at 03:55 PM
git push github mainline pushes to a mainline branch on the remote. It is possible that github is set to watch for the creation and update of the master branch and, since there is no master branch, assumes that the repo has not been updated. I am guessing that git push master would work properly here.
February 29th, 2008 at 03:56 PM
sorry, the last should be “git push origin master”