Home git Ignoring folders in Git

Ignoring folders in Git




Faced a problem, I use Grunt projects, when sending to a remote repository, I want to ignore the


node_modules , but constantly knocks the error.
I try:

node_modules / .gitignore
node_modules / * .gitignore

Tell me, please how to use it in this case .gitignore , because In this folder, there are a lot of other folders and everything needs to be ignored.

Answer 1, Authority 100%

Create a text file with the name of the .gitignore in the root of the project and enter it directory names (in your particular case – only one – Node_Modules ) that you want to ignore, by one on the string.

Check your editor in this file to use as Row Translation \ N (lf , linefeed ), but not \ r (cr , Carriage Return ), and not their combination \ r \ n (crlf ).

Useful information:

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions