I work on a project in a team and I need to checkout branches of others from time to time. Here is the thing.
All CSS and JS files are compiled from SASS/Coffeescript and it's all stored in /Static
directory. Obviously the compiled files are not included in remote repository. So I clone repository and compile them so I can run it on my local machine. I put the /Static
directory into .gitignore
.
Now let's say I run a checkout to a different branch. Everytime I do that, it aborts because there are uncommited files (those compiled ones). If I run git checkout <branch> --force
they obviously dissapear, so I have to compile them everytime I run a checkout.
So, how can I make git completely ignore /Static
directory (or any other I'd possibly want to) when commiting, checkout or any other operation? In other words: How can I make directories inside repository completely inactive in terms of git operations? Thanx