Closed josephdburdick closed 8 years ago
Hey big bro!
As always thank you for the advice! I will implement it when I get home tonight. Learnin' a ton, trust me.
Good to know that's what gitignore is for. I feel noob all day everydayyyyy.
Yeah, it's always something I saw the necessity for every since I started, but didn't know how to do it. Looking at one folder when you download a module is baffling.
Yeah, I understand. You won't have to worry too much about the contents of the node_modules directory because each module likely has it's OWN node_modules dir with their own dependencies. It can easily get pretty dense.
Another reason to use .gitignore right off the bat is to keep sensitive data out of the Github repo. If you're working on a large project and any sensitive data gets pushed to the online repository, you should consider that information potentially compromised and take necessary precautions.
The following command will retroactively remove a Git cached file or directory:
git filter-branch --force --index-filter \ 'git rm --cached --ignore-unmatch DIR_PATH_HERE/*'
Don't fret, I never memorize that command. I'm just aware of it and keep my Google Fu sharp.
Yo Josephus,
I just wanted to say thanks for the tip. Actually took care of this a while ago, but forgot to close this thread. As always, thanks for the help bro.
:+1: no prob mang
Hey, you really want to remove the Node modules from being versioned in Git. They make your repo large and you should leverage npm to handle dependencies.
node_modules
directory from the git repo history http://stackoverflow.com/questions/5563564/completely-remove-files-from-git-repo-and-remote-on-githubThis is good practice, I know it may seem unnecessary now but later on down the road, if you want to use this price remover as a module to something else, it'll be easier to plug and play and also make it easier for people to collaborate.