Skip to content

Instantly share code, notes, and snippets.

@javiermon
Forked from iegik/gitignore2svnignore.sh
Last active September 6, 2017 17:19
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 javiermon/b13568f4d1aa8dc8e86279ff1b36ee2f to your computer and use it in GitHub Desktop.
Save javiermon/b13568f4d1aa8dc8e86279ff1b36ee2f to your computer and use it in GitHub Desktop.
Oneliner to convert svn:ignore into .gitignore
#!/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 -u >> .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment