# Recovering from a loss of sync between git and svn

2 messages from 2013-03-18 to 2013-03-18. Participants: Jon Seymour.
Thread: https://gitlist.dev/t/33214

## Jon Seymour, 2013-03-18 05:03

Subject: Recovering from a loss of sync between git and svn
Message-ID: <CAH3Anrq4y54YA=qeEbO5z1FKB7Adg4G8vf4jmPLzLWa6tky0wQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAH3Anrq4y54YA%3DqeEbO5z1FKB7Adg4G8vf4jmPLzLWa6tky0wQ%40mail.gmail.com

```
G'day,

I managed to lose sync between the git-svn repo that I am using to
track an svn repo. In particular, the git-svn repo lost the content of
about 5 commits with the net result that the git-svn repo and the svn
repo it tracks have a difference of opinion about what the contents of
trunk are for the files involved in the missing commits.

The situation arose because I used --ignore-paths trunk on a
git-svn-fetch when I was trying to deal with an SVN user that had
copied trunk into the same SVN tag twice (which caused the source tree
to be duplicated under the trunk directory of the SVN tag).

I was hoping that --ignore-paths trunk would cause the git-svn copy of
the tag to exclude the unwanted copy of the trunk directory in the
tag. Instead, it appears to have caused my fetches of subsequent
commits to SVN trunk to be empty, resulting in divergence between by
git-svn repo and the SVN repo itself.

Does anyone have any tips about how I can fix this other than pulling
the entire SVN repo again?

jon.

```

## Jon Seymour, 2013-03-18 06:09

Subject: Re: Recovering from a loss of sync between git and svn
Message-ID: <CAH3AnroBmiTb45SG4FeL57OXUrXXVWKsvkOa9b2q5eLi7Vvudw@mail.gmail.com>
URL: https://gitlist.dev/e/CAH3AnroBmiTb45SG4FeL57OXUrXXVWKsvkOa9b2q5eLi7Vvudw%40mail.gmail.com
In-Reply-To: <CAH3Anrq4y54YA=qeEbO5z1FKB7Adg4G8vf4jmPLzLWa6tky0wQ@mail.gmail.com>

```
Ah, answering my own question....

I can see git svn reset does exactly what I need.

jon.

On Mon, Mar 18, 2013 at 4:03 PM, Jon Seymour <jon.seymour@gmail.com> wrote:
> G'day,
>
> I managed to lose sync between the git-svn repo that I am using to
> track an svn repo. In particular, the git-svn repo lost the content of
> about 5 commits with the net result that the git-svn repo and the svn
> repo it tracks have a difference of opinion about what the contents of
> trunk are for the files involved in the missing commits.
>
> The situation arose because I used --ignore-paths trunk on a
> git-svn-fetch when I was trying to deal with an SVN user that had
> copied trunk into the same SVN tag twice (which caused the source tree
> to be duplicated under the trunk directory of the SVN tag).
>
> I was hoping that --ignore-paths trunk would cause the git-svn copy of
> the tag to exclude the unwanted copy of the trunk directory in the
> tag. Instead, it appears to have caused my fetches of subsequent
> commits to SVN trunk to be empty, resulting in divergence between by
> git-svn repo and the SVN repo itself.
>
> Does anyone have any tips about how I can fix this other than pulling
> the entire SVN repo again?
>
> jon.

```
