# Share Obsidian Notes with Github Gist

**URL:** <https://forum.obsidian.md/t/share-obsidian-notes-with-github-gist/2194>\
**Category:** Workflows & Templates\
**Created:** [June 20, 2020, 12:02am UTC](https://forum.obsidian.md/t/share-obsidian-notes-with-github-gist/2194 "2020-06-20T00:02:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![satoru](https://forum.obsidian.md/user_avatar/forum.obsidian.md/satoru/32/1637_2.png) [@satoru](https://forum.obsidian.md/u/satoru)\
**Post date:** [June 20, 2020, 12:02am UTC](https://forum.obsidian.md/t/share-obsidian-notes-with-github-gist/2194/1 "2020-06-20T00:02:33Z")

</div>

Obsidian helps us manage our notes and other kinds of writings. With everything stored in a local directory, we can easily backup our knowledge base with tools like Dropbox. But still we need a way to share our writings, this tutorial shows a simple way to share notes with Github gist that only requires two steps to set up.

## Set up

1. Make sure you have a Github account.
2. Install a command line tool for gist: [gist](https://github.com/defunkt/gist). On macOS you can use `brew install gist` if you have `brew` installed.
3. Login with `gist --login`. It would ask you for your Github username and password to obtain OAuth2 access token, but it won’t save your password as you can see in the [source code](https://github.com/defunkt/gist/blob/master/lib/gist.rb#L347).

## Share

`gist MyNote.md`

A gist created for this article on Github looks like this: [Share Obsidian Notes with Github Gist.md · GitHub](https://gist.github.com/suzaku/be6146c98a715d2e54aa6687a7feef0b)

Enjoy sharing 🙂

---

<div class="post-metadata">

**Author:** ![Valery\_Kondakoff](https://forum.obsidian.md/user_avatar/forum.obsidian.md/valery_kondakoff/32/165_2.png) [@Valery\_Kondakoff](https://forum.obsidian.md/u/Valery_Kondakoff)\
**Post date:** [June 20, 2020, 8:57am UTC](https://forum.obsidian.md/t/share-obsidian-notes-with-github-gist/2194/2 "2020-06-20T08:57:41Z")

</div>

Thanks for the info! Is there a way to share notes with images?

---

<div class="post-metadata">

**Author:** ![satoru](https://forum.obsidian.md/user_avatar/forum.obsidian.md/satoru/32/1637_2.png) [@satoru](https://forum.obsidian.md/u/satoru)\
**Post date:** [June 20, 2020, 11:35pm UTC](https://forum.obsidian.md/t/share-obsidian-notes-with-github-gist/2194/3 "2020-06-20T23:35:59Z")

</div>

I think it’s feasible with Medium, because the Medium API allows you to upload images and create posts. I will share my solution if I work it out.

---

<div class="post-metadata">

**Author:** ![xirkus](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/x/958977/32.png) [@xirkus](https://forum.obsidian.md/u/xirkus)\
**Post date:** [January 19, 2021, 4:33am UTC](https://forum.obsidian.md/t/share-obsidian-notes-with-github-gist/2194/4 "2021-01-19T04:33:48Z")

</div>

Apparently no need to use the `gist` tool as the official `gh` CLI supports gists:

```auto
% gh gist --help
Work with GitHub gists.

USAGE
  gh gist <command> [flags]

CORE COMMANDS
  create: Create a new gist
  delete: Delete a gist
  edit: Edit one of your gists
  list: List your gists
  view: View a gist

INHERITED FLAGS
  --help Show help for command

ARGUMENTS
  A gist can be supplied as argument in either of the following formats:
  - by ID, e.g. 5b0e0062eb8e9654adad7bb1d81cc75f
  - by URL, e.g. "https://gist.github.com/OWNER/5b0e0062eb8e9654adad7bb1d81cc75f"

```
