Skip to content

Instantly share code, notes, and snippets.

@weiserr
Forked from iegik/gitignore2svnignore.sh
Created October 10, 2016 12:13
Show Gist options
  • Save weiserr/4b4fc61f5d05e50c53e0d8e6fc95dcba to your computer and use it in GitHub Desktop.
Save weiserr/4b4fc61f5d05e50c53e0d8e6fc95dcba 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 >> .gitignore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment