Skip to content

Instantly share code, notes, and snippets.

@fasiha
Created May 27, 2015 13:20
Show Gist options
  • Save fasiha/d20068a1478512ac59b3 to your computer and use it in GitHub Desktop.
Save fasiha/d20068a1478512ac59b3 to your computer and use it in GitHub Desktop.
Poor man's svn2git
#!/bin/bash
svn list -R `svn info | grep "Working Copy" | cut -d":" -f2` | grep -v '/$' | tr '\n' '\0' | xargs -0 git add
# Or just use https://github.com/nirvdrum/svn2git
@fasiha
Copy link
Author

fasiha commented May 27, 2015

Alternatively, to roll in git init:

cd `svn info | grep "Working Copy" | cut -d":" -f2`
git init
svn list -R . | grep -v '/$' | tr '\n' '\0' | xargs -0 git add
cd - # back to old working directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment