Search code examples
gitsvnversion-controlgit-svn

How to Rewrite/Reorder/Squash svn commit history with git svn?


This is after git svn dcommit:

commit5 master git-svn
commit4
commit3
commit2
commit1

Now I do git rebase -i (using emacs magit but it's the same thing).

I want to squash commit5 with commit3:

pick commit1
pick commit2
pick commit3
squash commit5
pick commit4

Then once this is done. I get:

Recent commits:
commit4
commit3+5
commit2
commit1

Unpulled svn commits:
commit5
commit4
commit3

Unpushed svn commits:
commit4
commit3+5

Now if I do dcommit or git svn rebase both end me in the same situation as before:

commit5 master git-svn
commit4
commit3
commit2
commit1

How do I solve this?


Solution

  • The comment by laurent is right. Client side history rewrite is not possible with svn, one would require admin rights for this work.