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:

https://help.github.com/articles/remove-sensitive-data/

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

647 views 0 4
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