# "Resetting" a repository

3 messages from 2011-09-27 to 2011-09-28. Participants: gitlist, Randal L. Schwartz, Roddie Grant.
Thread: https://gitlist.dev/t/28511

## gitlist, 2011-09-27 15:24

Subject: "Resetting" a repository
Message-ID: <4E81EAA7.5030708@myword.co.uk>
URL: https://gitlist.dev/e/4E81EAA7.5030708%40myword.co.uk

```
I have a project with a test repository and a live repository (and a 
development repository).

Over time, the test repository has had merges which were in a quite 
different order to the live repository, so it no longer fulfills its 
role of being pretty much like the live repository and therefore a good 
place to test. The two have diverged too far.

We've reached a point in the project when it would be good to reset the 
test repository so that it is exactly the same as the live one. We can 
then merge new work from the development repository.

I think that if I just merge the live repository into the test 
respository it will not remove extra (non-conflicting) code. On this 
occasion I want to remove all extra code and resolve all conflicts in 
favour of the live repository version.

I'd appreciate advice on the best way to do this.

Thanks

Roddie Grant

```

## Randal L. Schwartz, 2011-09-27 16:22

Subject: Re: "Resetting" a repository
Message-ID: <861uv27y6k.fsf@red.stonehenge.com>
URL: https://gitlist.dev/e/861uv27y6k.fsf%40red.stonehenge.com
In-Reply-To: <4E81EAA7.5030708@myword.co.uk>

```
>>>>> "gitlist" == gitlist  <gitlist@myword.co.uk> writes:

gitlist> I have a project with a test repository and a live repository (and a
gitlist> development repository).

You haven't mentioned what kind of access you have to the two repos.
Are they both bare remote repos?  Or can you just rsync one over the
other?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion

```

## Roddie Grant, 2011-09-28 07:52

Subject: Re: "Resetting" a repository
Message-ID: <4E82D23C.4020400@myword.co.uk>
URL: https://gitlist.dev/e/4E82D23C.4020400%40myword.co.uk
In-Reply-To: <861uv27y6k.fsf@red.stonehenge.com>

```
On 27/09/2011 17:22, Randal L. Schwartz wrote:
>>>>>> "gitlist" == gitlist<gitlist@myword.co.uk>  writes:
>
> gitlist>  I have a project with a test repository and a live repository (and a
> gitlist>  development repository).
>
> You haven't mentioned what kind of access you have to the two repos.
> Are they both bare remote repos?  Or can you just rsync one over the
> other?

Both repos are on the same virtual server. I normally use ssh for git, 
but have full access to the server. Both repos are not bare. The test 
repos is for the customer to test new stuff and the live repos is for 
the world to see the site (it's all for a website).

The development repos is on my laptop, but it's the test and live repos 
I want to get back in step with each other.

Thanks

Roddie Grant

```
