# Confusion using git on svn server

5 messages from 2009-06-20 to 2009-06-22. Participants: Matthieu Stigler, Florian Weimer.
Thread: https://gitlist.dev/t/19878

## Matthieu Stigler, 2009-06-20 20:28

Subject: Confusion using git on svn server
Message-ID: <4A3D4665.9040003@gmail.com>
URL: https://gitlist.dev/e/4A3D4665.9040003%40gmail.com

```
Hi

I just began using git on a svn file, which seems really nice. I'm for 
now confused with a git operation, as maybe my mind is still thinking 
with svn vision.

As I understood, unlike svn, you can make many commit without sending 
them to the server, and then then sending them in one block with git-svn 
dcommit (if I'm right, with push if git server).

So two questions:
-Where can I find documentation on that? Didn't find mention on it in 
git user manual or git-svn crash course.

-say I want to know, before doing git-svn dcommit, which commits will be 
sent, and if this will do a conflict... is there a way to check that 
before sending the commits?

My main concern is that in my git log, I have a commit and its "revert", 
will it be sent as two different commits to svn? I would love they are 
not sent at all as they represent a "neutral" operation.

Thanks a lot!

```

## Florian Weimer, 2009-06-21 07:49

Subject: Re: Confusion using git on svn server
Message-ID: <87zlc258nj.fsf@mid.deneb.enyo.de>
URL: https://gitlist.dev/e/87zlc258nj.fsf%40mid.deneb.enyo.de
In-Reply-To: <4A3D4665.9040003@gmail.com>

```
* Matthieu Stigler:

> My main concern is that in my git log, I have a commit and its
> "revert", will it be sent as two different commits to svn? I would
> love they are not sent at all as they represent a "neutral" operation.

They will be sent as a separate commits by default.

You can use "git rebase -i git-svn" to edit your local history before
submitting it, though.

```

## Matthieu Stigler, 2009-06-21 09:09

Subject: Re: Confusion using git on svn server
Message-ID: <4A3DF8BE.2050504@gmail.com>
URL: https://gitlist.dev/e/4A3DF8BE.2050504%40gmail.com
In-Reply-To: <87zlc258nj.fsf@mid.deneb.enyo.de>

```
Florian Weimer a écrit :
> * Matthieu Stigler:
>
>   
>> My main concern is that in my git log, I have a commit and its
>> "revert", will it be sent as two different commits to svn? I would
>> love they are not sent at all as they represent a "neutral" operation.
>>     
>
> They will be sent as a separate commits by default.
>
> You can use "git rebase -i git-svn" to edit your local history before
> submitting it, though.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>   
Excellent! This is exactly what I was looking for, thanks!

I had a minor issue as the commits I wanted to remove (a modif and its 
revert) were the last one, so I could not remove both in the same time, 
as said:

However, if you remove everything, the rebase will be aborted.


So I just added a minor third commit in order to remove the two first. 
Is there a better way to do than this workaround? Something with git 
rebase --onto (two last?)

Thanks a lot!

```

## Florian Weimer, 2009-06-21 09:32

Subject: Re: Confusion using git on svn server
Message-ID: <87ws763pa1.fsf@mid.deneb.enyo.de>
URL: https://gitlist.dev/e/87ws763pa1.fsf%40mid.deneb.enyo.de
In-Reply-To: <4A3DF8BE.2050504@gmail.com>

```
* Matthieu Stigler:

> So I just added a minor third commit in order to remove the two
> first. Is there a better way to do than this workaround? Something
> with git rebase --onto (two last?)

If you want to remove the last two commits, you can use "git reset
HEAD^^".  This moves your working copy (and the associated master
branch) back in time.

```

## Florian Weimer, 2009-06-22 06:16

Subject: Re: Confusion using git on svn server
Message-ID: <877hz4ssi9.fsf@mid.deneb.enyo.de>
URL: https://gitlist.dev/e/877hz4ssi9.fsf%40mid.deneb.enyo.de
In-Reply-To: <fabb9a1e0906212304o2b61d081i4cf72300be8bd775@mail.gmail.com>

```
* Sverre Rabbelier:

> It moves your tree only if you add --hard, although in case of a reverted
> revert it doesn't matter.

Well, this is part of the checkout/reset confusion.  Even without
--hard, reset changes where the working tree is located in the
history.  But it doesn't perform a checkout.

As you said, with a rever, this shouldn't matter.

```
