Jiaji's Blog

gitignore Magic

Apr 3, 2015

.gitignore file looks simple. However, if I ask you the question:

What’s the difference between log/* and log/?

I bet most people cannot tell correctly.

I came across this question when I did a .gitignore file clean-up in my project. It took me a while to understand the difference and I find it super easy to be forgotten. After looking up the manual and doing experiments several times, I decide to write this post. Hope it can help those who think about this question as well.