I created a git repository from an existing SVN repo. In the SVN structure, I have the trunk and one branch (say, branch_01). The trunk is at the Revision 8, and the branch code, despite the changes, is updated until revision 4.
After I fetched the SVN repo into a git one, I ended up with the following structure in my git repo:
trunk A(4)------B(6)---------C(8)
branch_01 D(5)--------E(7)---------F(9)
My question is, how to I rebase branch_01 for the git repo structure be like this?
trunk A(4)------B(6)---------C(8)
\
branch_01 D(5)--------E(7)---------F(9)
Thanks in advance.
Given your diagram above, where A(4) is 2 commits before the current trunk C(8):
If the diagram provided is simplified, it would probably be easier to find the explicit hash for the revision 4 commit, and then use that in place of
trunk~2in the command above.Note Dmitry’s warning: only do this if you are abandoning the SVN repository. If you intend to continue using git-svn, you don’t want to do this.