Hi all,

I can't remember where I found the attached script, but with it, and a .gitconfig like


you can now produce "diffs" in an SVN format from your git repo, e.g. "git svn-diff".


-- Leif

# git-svn-diff
# Generate an SVN-compatible diff against the tip of the tracking branch
TRACKING_BRANCH=`git config --get svn-remote.svn.fetch | sed -e 
REV=`git svn find-rev $(git rev-list --date-order --max-count=1 
git diff --no-prefix $(git rev-list --date-order --max-count=1 
sed -e "s/^+++ .*/&    (working copy)/" -e "s/^--- .*/&    (revision $REV)/" \
-e "s/^diff --git [^[:space:]]*/Index:/" \

Reply via email to