git - Moving historical SVN commits into existing Github repo? -


some time ago moved subversion repository on git , github when decided open source software, , i'm not sure did commit history wasn't moved over. @ time thought didn't care, think quite 2+ years of commits in github, if no other reason record of work effort. problem project has been on github while , has been forked , received commits since created.

is there way "back port" historical commits old repo, , put them living, breathing github repo?

note: half-heartedly tried svn2git --rebase i'm not sure if work considering there have been commits since svn repo left behind. got error , i'm not sure means:

 command failed:  2>&1 git svn fetch 

ancestry in git nothing more commit (which text file) containing 1 or more lines read parent <hash of parent commit>. if want insert history before first commit, need parent line (first commits not have one), , change first commit's hash, mean descendant(s) need change parent pointers, , goes recursively through commits, descended repo's first commit.

if you're not worried messing people working on forks (because changing history in project), can redo operation create second git repo of old history, add repo remote new repo, , fetch in changes, you'll have 2 roots in new repo. may warning no commits in common; fine. can view history bearings: git log --all --graph --oneline --decorate, rebase --onto move new repo's new work on top of old repo's history brought in. presumably tree in new repo's first commit identical tree in old repo's last, may simple as: git rebase --onto b c, a last commit in old repo's history, brought in, b first commit in new repo (which here being considered "old base" of new repo, aren't rebasing onto old history, because should identical, , c, head of branch in new repo want rebase onto this, master.

your repos may more complicated that, , may need more work figure out seam rejoining things, that's general idea. can git remote rm newrepo, "newrepo" being whatever named remote when adding it. should clear out second root , fetched-in commits. finally, can force push github. have changed literally every commit hash, none of forks work, you'll have history, , people clone again, or reset --hard new master catch up. you'll want inform of on repo page, , maybe find people forked , alert them of intentions.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -