NOTE: This is a workflow for committers. The good news is that non-committer git-svn is simpler still!
Adjust to taste, of course, but
alias show='for i in `git remote show`; do git remote show $i; done' alias dif='git diff' alias co='git checkout' alias ci='git checkin' alias branch='git branch' alias status='git stat' alias upall='for i in `branch|colrm 1 2|grep -vf ~/.dead-git-branches`; do co $i; git pull; done'
That last once is extra-fancy – just branch names you no longer want to work with in ~/.dead-git-branches to ignore them forever more
In this case, I'm relying on the kindness of Bill Erickson who set up ESI's git mirror (sync'd every 3 minutes, IIRC)
$ mkdir ~git/ILS $ cd ~git/ILS $ git init $ git config branch.autosetupmerge true
$ git remote add eg-esi git+ssh://git.esilibrary.com/home/evergreen/evergreen-equinox
or
$ git remote add eg-esi git://git.esilibrary.com/git/evergreen-equinox.git
for read-only. Then grab it:
$ git fetch eg-esi
[svn-remote "svn"] url = svn://svn.open-ils.org/ILS fetch = trunk:refs/remotes/trunk branches = branches/*:refs/remotes/* tags = tags/*:refs/remotes/tags/*
$ git svn fetch
(WARNING: this takes about 4 hours. There are other ways to do it, but this is the simplest I've found)
$ co -b fun_stuff eg-esi/master
$ ci -a -m 'it really was fun'
$ git pull
It should know where to pull from, but if git gets confused use
$ git pull eg-esi master
$ git rebase -i HEAD~`git log --oneline master..|wc -l`
This rebases the entire commit stream since branching including upstream merges, so beware! In particular, only squash the commits in your local branch, not merged from upstream … seriously, don't.
$ git push eg-esi fun_stuff
$ git svn fetch
$ git pull
$ git svn dcommit --dry-run
You can use the tree-ish output from that to check your changes
$ dif {hash}^1 {another hash}
$ git svn dcommit
Profit!