www-infrastructure-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Santiago Gala" <santiago.g...@gmail.com>
Subject Re: Git mirror for Cayenne (vs. git-svn)
Date Wed, 08 Oct 2008 15:30:24 GMT
On Tue, Oct 7, 2008 at 10:56 PM, Jukka Zitting <jukka.zitting@gmail.com>wrote:

> Hi,
> On Tue, Oct 7, 2008 at 9:45 PM, Doug Cutting <cutting@apache.org> wrote:
> > I've heard rumors of folks running git and svn in the same workspace. So
> you
> > could, e.g., have different git branches for different patches you're
> > working on, switch to a particular git patch branch, then commit it
> directly
> > using svn.
> Sounds interesting. Git-svn can do this, but I don't know how you
> could do it directly with svn (unless perhaps if you include also the
> .svn directories in the git repository).

git checkout <branch1>
git commit -a -m "blah"
git dcommit -n #to check
git dcommit
git checkout <branch2>

if both branches exist in svn this should work

if not, I typically rebase/merge my git-only topic branch (bugfix,
refactoring...) into the svn "main" one, and commit/dcommit into the
subversion repository. This can be done keeping the merged commits, as in:

- create a branch for a refactoring from the svn "tip"
- do 20 commits with different changes, each keeping the build alive and
tests passing
- merge this branch into the one related with svn (after a checkout/git svn
- dcommit from the svn branch
-> 20 commits will go to svn with their original message. They might be
slightly different from the topic ones if changes were needed for merging or
some hunk landed in the main and topic branch during the process...

It is a nice way to preserve history of long disconnected efforts, and it
allows for something like "making up" history, i.e., cleaning up, sorting
and commenting the commits in the topic branch before merging.

This is conceptually switching from "version control as a way to record what
happened" to "version control as a way to design/track/document progress in
a project". Two different mind sets, one makes emphasis in transations that
show what went on in disk, the other makes emphasis in logical steps towards
a problem resolution.

Git seems to be shifting people from the first to the second mindset.


> BR,
> Jukka Zitting

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message