Yeah, this. Plus a mistake from the article:
$ echo '*\n!.gitignore' > build/.gitignore
The \n won't be interpreted specially by echo unless it gets the -e option.Personally if I need a build directory I just have it mkdir itself in my Makefile and rm -rf it in `make clean`. With the article's scheme this would cause `git status` noise that a `/build/` line in a root .gitignore wouldn't. I'm not really sure there's a good tradeoff there.
> The \n won't be interpreted specially by echo unless it gets the -e option.
Author's probably using Zsh, which interprets them by default.