On Fri, Oct 9, 2009 at 8:02 AM, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote: > bill lam schrieb: >> I have two git repos, no branches. >> >> repo 1. >> emptyrootcommit -- A ... M >> >> repo 2. >> emptyrootcommit -- N ... Z >> >> N was evolved from M but the time gap is large, how can I combine them >> into one repo >> >> emptyrootcommit -- A ... M -- N ... Z >> >> so that snapshots N .. Z will not be changed. > > $ echo $(git rev-parse N) $(git rev-parse M) >> .git/info/grafts > $ git filter-branch --tag-name-filter cat -- --all --not M > > i.e. you graft the older history right before the younger history, then > you use git filter-branch to rewrite the parentship of the younger commits. If you cannot create a new history, using "git replace" could be better than using grafts. ("git replace" is in the "master" branch in the git repository. It will be in git 1.6.5 that should be released soon.) Regards, Christian -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html