After Google-ing the whole day, I will have to ask experts to help me.
I cloned some public SVN repo that I converted to git. This repo has just one master branch, and it starts from some specific version, say 1.0.
I also have a git repo that was created independently, and that starts with the same 1.0 version. I created this because I wanted to hack some public project. I just downloaded the source code, created empty git repo, added version 1.0 and proceeded to hack on it. This repo also has just master branch.
Now, I would lie to create a third git repo, where version 1.0 would be the starting point, and it would have two branches: ‘svn’ and ‘mystuff’. I would like to keep history of both branches.
1.0
/ \
/ \
br. svn br. mystuff
| |
v1.1 v1.1'
v1.2 v1.2'
v1.3 v1.3'
. .
. .
If I had this I could easily get new revisions from SVN repo using svn2git, and easily merge them with my local “mystuff” branch. I don’t need to push to SVN repo, just fetch new revisions from it.
Can you help me make using git fun again?
The kind-of-hacky way is using
git format-patchto export all the commits of a repo to a directory,git checkoutthe other’s repo1.0branch, create a new branch (git checkout -b new-branch), and thengit amyour previously generated patches.So, let’s call
publicyour clone of the public SVN repo, andlocalthe git repo you made by downloading the source and hacked onto.