So yesterday, I learned how to use a .gitignore file. I had seen them in use, and knew some folks used them, but i had not yet. Again another thing, that until you do it, you’ve never done it. Then once you do it, ok. Turns out, like most things, no big deal once someone explains it to you. Well, no one explained it to me. It was my job to explain it to someone else. Ya. ok, I have never used it, knew a little about it, so go figure it out. And I did.
A file, with no file extension like .doc, or .txt, and starts with the .dot, which makes it a “hidden” file. Like your hosts file on windows, c:\Windows\System32\Drivers\etc\hosts
I currently just have two lines in there
node_modules
npm-debug.log
later I will have 3
Put the .gitignore file at the root of your project. Now in an earlier version of my project, I had the node_modules in a folder called flapper news, so it would have been /node_modules. But now its also at the root.
I later added the npm-debug.log to the .gitignore file once I started trying to deploy it and the log file poped up. I don’t need that in the git repository.
Later, if I use grunt, I will need to add “build/*.js” to the .gitignore file as well. So check out the Readit project and my use of the .gitignore file on my GitHub @gokemon