Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore parent directory in Git version control

Tags:

git

gitignore

How to ignore parent directory in .gitignore? I tried this patterns, but seems they are don't work:

/../*
../
../*
like image 741
WelcomeTo Avatar asked Oct 21 '13 07:10

WelcomeTo


1 Answers

If you want to ignore a folder but don't want to modify an existing .gitignore, drop a .gitignore in the folder containing only an asterisk.

*

Here is a quick BASH example to accomplish this task for the .idea folder:

$ echo '*' > .idea/.gitignore
like image 113
Michael Allan Jackson Avatar answered Sep 23 '22 15:09

Michael Allan Jackson