Skip to content

Instantly share code, notes, and snippets.

@sepehr
Forked from iegik/gitignore2svnignore.sh
Created June 24, 2014 08:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sepehr/01138a6b8a8e2b920a59 to your computer and use it in GitHub Desktop.
Save sepehr/01138a6b8a8e2b920a59 to your computer and use it in GitHub Desktop.
Shell: Convert .svnignore to .gitignore & viceversa
#!/bin/bash
cat .gitignore | sed 's/^/\.\//g;s/\(.*\)\/\([0-9a-zA-Z\*\?\.]*\)$/svn propedit svn:ignore "\2" \1 /mg' | bash
#!/bin/bash
svn propget -R svn:ignore | grep -v "^$" | sed "s/\(\(.*\) - \)\(.*\)/\2\/\3/g" | sort >> .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment