views:

64

answers:

2

I am new to Git and have the newb following dilemma. I moved my old svn repo to github initially by just initializing a repository full of the files from my svn repository (minus the .svn stuff). Then, later I read that I could import my svn history, maintaining the history. So I deleted all contents of my master branch on github and then merged it in with my imported svn master. Then I pushed this up to github, so my commit history is something like

svn1 <- svn2 <- ... <- svnX <- E <- o <- o <- ... <- HEAD
                              /                        
                   A <- B <- C

where A is the initial commit (just copied files from svn repo), C is the where I deleted all of the stuff uploaded in A, and E is the merged of git-svn stuff and the initial repo.

So my question is, can I get rid of A through C in the history since I merged an empty directory at E? I've been reading about git rebase, and tried several things, but nothing worked.

Thanks! Ian

A: 

Problem is phylosophy. Don't create problems for yourself that you subsequently resolve. You can always start from scratch and recreate your repo on Github.

Andrew Kolesnikov
I didn't want to delete my repo because I already had a bunch of issues entered... so I'm trying to work with what I have.
Ian Fiske
A: 

Are A, B, and C already in your master branch? If so, you can just go ahead and delete the branch with git branch -d <branch>. If that gives you errors, you can override it by using a capital -D.

Kyle Slattery
Thanks for your answer. Yes, A, B, C were already on a branch called "master" so I don't think I can use"git branch -d master".
Ian Fiske