How to remove .svn from my git repo?

NancyMilligan August 5, 2015

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

0 votes
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

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/

sreekumar_menon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2015

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.

sreekumar_menon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2015

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

0 votes
sreekumar_menon
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 5, 2015

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events