Create Github gist using file, with Gist API

I am attempting to make a github gist using the following command

curl -X POST -d '{"public":true,"files":{"test.txt":{"content":"String file contents"}}}' -u mgarciaisaia:mypassword

How should I edit the command such that it uploads a file on my local computer to the new gist, instead of taking content in a string from the command line?

Read more here:

Content Attribution

This content was originally published by Norman at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: