Today I Learned

hashrocket A Hashrocket project

Create with Timestamp

Today I learned how to interpolate a timestamp at the command line. Here are two examples:

For a file:

$ touch test_$(date +%s).md
$ ls

For a git branch:

$ git checkout -b pull_request_$(date +%s)
Switched to a new branch 'pull_request_1435435344'

The timestamp represents seconds since the UNIX epoch.

See More #command-line TILs