Skip to main content
deleted 21 characters in body
Source Link
Mureinik
  • 315.9k
  • 54
  • 400
  • 405

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?

Thanks in advance

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?

Thanks in advance

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?

Source Link
MoMa
  • 21
  • 5

Remove multiple instances of files from Git source control

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?

Thanks in advance