0

I'm using Visual Studio Community 2017 and have just migrated all my repos from VisualSVN to Git. Because branches are seperate folders in SVN, in Git those branch folders now contain seperate copies of the code. As part of cleaning the git repo up I want to remove all instances of certain files, such as app.config (which should never have been there anyhow), across all folders in the git repo.

How can I remove all instances of a app.config no matter where in the folder structure it is. I know that

git rm --cached <file name> 

can remove a single file, but how can I search over the entire repo to remove all instances of that file?

1 Answer 1

1

I'm not aware of a way to do this in git alone, but some shell scripting this should make it possible:

$ find . -name <file name> -exec git rm --cached {} \; 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.