1

So I migrated a SVN repository to GitHub. I checked out the migrated repository using SVN, and I accidentally made an empty commit (r75 in SVN history). In order to remove the empty commit, I checked out the repository again, this time using git directly, and removed the commit with:

git rebase -i HEAD~2

After forcing a push to master, GitHub now properly displays only 74 commits, but when I look at the SVN log, I can still see the commit as r75.

zmurray@zmurray-linux:~/blah$ svn log -r 75
------------------------------------------------------------------------
r75 | zachary.murray | 2013-10-11 15:05:05 -0700 (Fri, 11 Oct 2013) | 2 lines

Blah blah blah, I'm a dumb stupid SVN commit message I can't seem to kill.

------------------------------------------------------------------------

I just want to expunge this stupid message once and for all. There are no other commits past r75, and I just really want to make r74 the HEAD again. Is there no hope? Help!

Zachary Murray
  • 1,220
  • 9
  • 16
  • Strange. It does look like the SVN "view" of a Github repo simply ignores any history modifications done via Git (reset/rebase etc.). Probably only the Github staff can answer the why. – sleske Oct 14 '13 at 09:57
  • I contacted Github support about this. I'll post their reply as an answer. – sleske Oct 16 '13 at 11:48

1 Answers1

1

This seems to be a general problem with the Subversion subsystem of GitHub.

Based on some tests, it does not cope well with repositories whose history was changed using git (reset/rebase etc. plus git push -f). A subsequent svn checkout + svn log will either just show the old history of the repository, or show different intermediate commits to at least reach the same filesystem state in the final commit.

I contacted GitHub, and they confirmed this. Apparently it is mainly done like this because Subversion assumes history never changes, thus showing new/changed commits to the Subversion client would invalidate all Subversion working copies.

It looks like this is not yet documented anywhere, though this may change.

sleske
  • 81,358
  • 34
  • 189
  • 227