Can't push to own public gist #22668
-
Hi, I created and cloned public gist. What do I do wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Ok, I played a bit more with it: I can’t add files in sub-dirs. Is this expected? |
Beta Was this translation helpful? Give feedback.
-
Hi there. 👋 What you’re trying to do simply won’t work, since a gist is one file, mostly use to share snippets and such, what you want to be using is a repository, where you can have multiple files in one place, to do that click your avatar in the top right corner, click on You can read more in depth on the documentation, here’s some useful pages. Hope that is helpful to you. 🙂 |
Beta Was this translation helpful? Give feedback.
-
Sorry, @thinkverse, but your answer is not useful. Gists allow multiple files and pull/push operations. I had my reasons to try them instead of standard repos. |
Beta Was this translation helpful? Give feedback.
-
Hi @vmakieienko, welcome to the GitHub Support Community! Yes, this is expected. Gists can contain multiple files but only on the same directory level. As Gists are intended for sharing snippets of code—usually embedded on other sites—they were designed to show all the code on the same page at the same time and can’t contain directories at all. If your project needs a directory structure then we’d recommend using a regular repository instead. |
Beta Was this translation helpful? Give feedback.
-
Hi @thomasshaped, is there any chance this limitation gets clearly communicated via documentation? I have seen instructions on how to push/pull to/from gits and some lines like “this is just another git repo”(not sure where though), but nothing regarding levels limitation. |
Beta Was this translation helpful? Give feedback.
-
Here is the definition from the GitHub glossary on Gists.
There is also this section about Editing and sharing content with gists. 🙂 |
Beta Was this translation helpful? Give feedback.
-
From link you provided:
I would say “single level only repositories” would be more clear. |
Beta Was this translation helpful? Give feedback.
Hi @vmakieienko, welcome to the GitHub Support Community!
Yes, this is expected. Gists can contain multiple files but only on the same directory level. As Gists are intended for sharing snippets of code—usually embedded on other sites—they were designed to show all the code on the same page at the same time and can’t contain directories at all.
If your project needs a directory structure then we’d recommend using a regular repository instead.