tags:

views:

478

answers:

2

Is it possible (or desirable?!) to set up git svn to behave more like git? For example, instead of writing

git svn dcommit

why can't I just write

git push

Similarly, instead of

git svn rebase

why not just

git pull
+2  A: 

git is different than svn. git-svn is a extension to allow people to use git with svn.

One collision is the checkout action, which kind of checkout do you mean? "svn checkout" or "git checkout" or a "git svn clone".

Another is "commit", local "git commit", remote "svn commit" :P

That's not to say, they couldn't try to hide more of the differences, by looking at the config.

sfossen
Huh? There's no such thing as "git svn checkout". Anyway, I guess it's true that the abstraction would be too leaky to be useful.
Will Robertson
+7  A: 

git and svn are philosophically different, and pushing/pulling is one of the key differences.

While I could argue that what you are proposing is fundamentally wrong (and you even suggest that in your question), you could accomplish your goal with aliases and a bit of mental re-wiring.

These aren't perfect, but might work for you or give you some ideas.

#file: .git/config
# assumes your svn-remote is called svn
alias.co = git config svn-remote.svn.url > /dev/null && git svn rebase || git pull --rebase
alias.ci = git config svn-remote.svn.url > /dev/null && git svn dcommit || git push
Ryan Graham