Can I make git-svn more like git?
Question
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
Solution
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
OTHER TIPS
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.
To use standard Git workflow and commands when working with Subversion repository, you may use SubGit (http://subgit.com/) instead of git-svn.
SubGit works faster, doesn't require you to keep history linear with "git rebase" and lets you push and pull with any Git client.
Disclaimer: I'm a SubGit developer.