0
Q:

git ignore

You can ignore entire directories, just by including their paths and putting a / on the end:

1
2
node_modules/
logs/
4
node_modules
.DS_Store
.env
5
$ echo debug.log >> .gitignore
$ git rm --cached debug.log
rm 'debug.log'
$ git commit -m "Start ignoring debug.log"
5
directory_to_exclude/
4
In Terminal, navigate to the location of your Git repository.
Enter touch .gitignore to create a .gitignore file.
3
in .gitignore:
	folder/
1
echo "
bin/**
lib/**
pyvenv.cfg
**.pyc
"  > .gitignore
cat .gitignore
1

New to Communities?

Join the community