thomiceli / opengist

Self-hosted pastebin powered by Git, open-source alternative to Github Gist.
https://opengist.io
GNU Affero General Public License v3.0
1.89k stars 100 forks source link

Allow pushing of directories #364

Closed KopiNinja closed 3 weeks ago

KopiNinja commented 3 weeks ago

I encountered the following error message when trying to push a directory:

>git push -u origin master
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 16 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 1.29 MiB | 13.94 MiB/s, done.
Total 7 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
remote:
remote: Pushing files in directories is not allowed:
remote:   dist/assets/index-C6IM6O8l.css (7a07b8d)
remote:   dist/assets/index-CLX_rAEX.js (7a07b8d)
remote:   dist/index.html (7a07b8d)
remote:
To http://127.0.0.1:6157/init
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://127.0.0.1:6157/init'

It would be great if you could enable pushing of directories. ☺️

thomiceli commented 3 weeks ago

I think you should rather use Gitea if you want to store a repository with directories

https://github.com/go-gitea/gitea

KopiNinja commented 3 weeks ago

Ok 😔, thanks anyway! This is the best Gist alternative I've found! Sometimes I need to send directories to Gist, and if I could send them to OpenGist too, I would completely switch from Gist.