I was not able to fully master the directory specification in .gitignore but I do not have to. Sometimes, it’s enough to have a .gitignore file that says: “please ignore everything expect this .gitignore file”.

Change directory to the folder where you want to ignore, and then:

touch .gitignore

Press Shift + Command + ., then you’ll be able to see .gitignore file. Open it, and write the …