How to remove .svn from my git repo?

I didn't have my .gitignore files setup before I committed my project. Now all my .svn/* files are being committed. How can I expunge these files from my repo and tell git to stop tracking them (using SourceTree)? Thanks!

2 answers

In file status view, select all files, and you may right click on the file/folder and select stop tracking within sourcetree and add it to .gitgnore.

Doing as @sreekumar menon mentioned, the .svn is still part of your history - but will not be part of the future history.

If you want to remove your svn-folder permanently from your complete history, have a look for example at this:

Thanks for the link- this worked for me - git rm -r --cached some-directory git commit -m 'Remove the now ignored directory "some-directory"' git push origin master also add it to .gitignore.

Johannes link will remove it from entire history, if you don't care about appearing in history the above should work.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,101 views 4 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you