Skip to content

Instantly share code, notes, and snippets.

@marr
Created November 10, 2010 21:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marr/671572 to your computer and use it in GitHub Desktop.
Save marr/671572 to your computer and use it in GitHub Desktop.
#!/bin/bash
git fetch $GIT_REPO
git branch tmp $(cut -b-40 .git/FETCH_HEAD)
git tag -a -m "Last fetch" newlast tmp
git rebase --onto master last tmp
git branch -M tmp master
git svn dcommit
mv .git/refs/tags/newlast .git/refs/tags/last
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment