Create new files without touching them
Instead of creating new files with touch
, you can use the redirection operator:
# this works
$ touch foo.txt
# but this is easier
$ > foo.txt
The redirection operator is also more generally capable, because you can add text to the file that you are creating.
echo node_modules > .gitignore