How to completely remove .svn files in Git

I am trying to remove all .svn files and folders for my repo. I am using Git. But I downloaded the source from a server which came with all the nasty .svn files. I don’t want to committ these. I have already created a .gitignore file to completely ignore .svn files but this isn’t working.

I have already searched and read loads of answers on the web and on Stack Overflow. I tried using

  • Show all commits whose diff contain specific string
  • Can GIT, Mercurial, SVN, or other version control tools work well when project tree has binary files?
  • git vs mercurial performance
  • Are there any good graphical Git and Hg/Mercurial clients on Mac OS X?
  • Git tool to remove lines from staging if they consist only of changes in whitespace
  • Who propagate bugfixes across branches (corporate development)?
  • find . -type d -name '.svn' -exec git rm -rf {} \;

    To completely remove .svn files but they still linger. I am using Source Tree and tried Git Tower, but all the .svn files still appear as pending.

    It maybe that I have previously accidentally committed a .svn file so its still appearing. Any clues how to ignore them totall or remove them would be a god send.

  • Started a branch too late, change the parent of my branch
  • Issue with git pull master is out of sync with origin master
  • Git won't show log unless I am in the project directory
  • Can git and subversion play nice together?
  • Removing all files from a just initialized git repo staging area
  • Github workflow for single developer
  • One Solution collect form web for “How to completely remove .svn files in Git”

    find . -name '.svn' -type d -print0 | xargs -0 rm -rf
    git commit -a -m "Deleting all .svn folders and files"

    You can also update the .gitignore file afterwards.

    Git Baby is a git and github fan, let's start git clone.