In the last year or so I’ve discovered the wonders of GIT for managing source code and we’ve now moved the majority of our live code base in to repositories at work.

However, as with most learning curves, you make some mistakes at first. One thing that’s been really bugging me is that I didn’t know about the ".gitignore" file when creating my first few repositories. This means that all the binary files were also initially added. As soon as I learnt about the ignore file I went back and added it. Problem is, the git ignore file only limits finding new files to add, if the file is already being tracked then the ignore file has no effect. Have tried to find solutions, but most of the stuff seems to refer to "filter-branch" which to be honest I don’t fully understand.

So, here’s my:

Super Simple Method of Removing Files/Folders that should be ignored

Example: you wanted to ignore the "bin" folder from your project.

Perhaps there’s some kind of smarter way of doing this, but I just find this method really easy to understand! It certainly made my day when I finally got rid of these files!