threads / discuss / 13639

git-svn: commit all changes as one svn revision?

Subject: git-svn: commit all changes as one svn revision?

## tl;dr

3 messages between May 23, 2008 and May 23, 2008.

replies: 2people: 3as markdown or json

Robert Anderson· May 23, 2008, 16:08 UTC · lore
Use case:

I make a bunch of git commits developing something that was checked out from a svn repo using git-svn. I want to commit all the changes since my last dcommit as one revision, rather than having each git commit checked in separately, as dcommit behaves.

Is there a way to do this?

Thanks, Bob Anderson

Thomas Harning· May 23, 2008, 16:22 UTC · re: Robert Anderson · lore

Re: git-svn: commit all changes as one svn revision?

On May 23, 2008, at 12:08 PM, Robert Anderson wrote:
Show 6 quoted lines
> I make a bunch of git commits developing something that was checked
> out from a svn repo using git-svn.  I want to commit all the changes
> since my last dcommit as one revision, rather than having each git
> commit checked in separately, as dcommit behaves.
>
> Is there a way to do this?
git-svn dcommit -m
  (IIRR)
Thomas Rast· May 23, 2008, 16:31 UTC · re: Robert Anderson · lore

Re: git-svn: commit all changes as one svn revision?

You wrote:
> I make a bunch of git commits developing something that was checked
> out from a svn repo using git-svn.  I want to commit all the changes
> since my last dcommit as one revision, rather than having each git
> commit checked in separately, as dcommit behaves.
I usually do

$ git checkout -b side master ... edit, commit ... $ git checkout master $ git merge --no-ff side $ git-svn dcommit

The resulting merge commit looks like a normal merge to Git (keeping history intact), but like a squashed commit of all changes on 'side' to SVN.

(If you made all commits on master, you can branch 'side' and hard reset master to origin/master first.)

- Thomas
-- 
Thomas Rast
trast@student.ethz.ch

← back to recent threads