Skip to content

Instantly share code, notes, and snippets.

@unrelentingfox
Last active July 11, 2018 20:35
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 unrelentingfox/74692c7be003caf882049c9f85e3c605 to your computer and use it in GitHub Desktop.
Save unrelentingfox/74692c7be003caf882049c9f85e3c605 to your computer and use it in GitHub Desktop.
#!/bin/bash
# This script is for git-svn, just a quick way to copy ignores from svn repo to local git repo.
# Also appends intellij specific files to ignore since I'm the only one on my team that uses intellij.
GREEN='\033[0;36m'
if [ -e ".git" ]; then
printf "${GREEN}Copying ignore file from Subversion..\n"
git svn show-ignore > .git/info/exclude
wait
printf "Adding intellij specific files to ignore..\n"
printf "\n*.iml\n*.idea\n" >> .git/info/exclude
wait
printf "New .git/info/exclude:\n"
cat .git/info/exclude
wait
else
printf "Not a git repository!"
fi
printf "\nDONE!\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment