0

I have a folder and I don't want to push that folder into the git repo when I do git add ., commit and push my work. Is there a way to avoid that folder getting pushed to the repo? How can I do that

Ulysse BN
  • 10,116
  • 7
  • 54
  • 82
Jonny
  • 823
  • 3
  • 14
  • 25
  • 2
    Possible duplicate of [What is .gitignore exactly?](https://stackoverflow.com/questions/27850222/what-is-gitignore-exactly) – Mureinik Jan 02 '19 at 05:43

2 Answers2

1

just add it to .gitignore like this:

# dependencies
/node_modules
YASH DAVE
  • 1,066
  • 12
  • 25
0

Create a .gitignore file in the root folder,
and simply put the name of the file/folder you don't want to track in it.

Check git documentation for more.

Ulysse BN
  • 10,116
  • 7
  • 54
  • 82
Til
  • 5,150
  • 13
  • 26
  • 34