How to resync git with svn tree?

Background

I add some features to a project that uses subversion - I use git-svn to clone it into my local repository, git-svn rebase, to keep the latest changes in the official tube and keep the history linear.

I recently forgot myself and made several mergers that ruined my long history. I needed to spend some time on the cherry pick to make the story linear again. After this, 1 rebase went well, but now an attempt to make git-svn rebase shows that there has been a conflict between subversion transactions since 2008 (about 700 commits ago), although the story seems linear.

Question

  • Is there any way to rebuild / rebuild my git repository using svn trunk?
  • If I clone my git repository on another computer (without the .git / svn folder) - can I reinstall it using svn knowing the repo url and the latest modified version?
+4
source share
1 answer

You can reset your branch to commit, which is definitely synchronized (some kind of old), and then synchronize with rebase.

To save changes made locally, you might want to branch out to (and cherries - select the necessary changes from this new afterwatds branch)

git branch branch_with_my_changes git reset --hard very_old_commit_that_is_synced git svn rebase 
+2
source

Source: https://habr.com/ru/post/1305449/


All Articles