Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fork Gist to Repo on GitHub

I have a bunch of templates I made in Gist form so people can discuss them at the bottom.

We like to copy these files and paste them into a repo and make an addon there. Is it possible to fork a Gist to Repo via the GitHub site or client? If not either of those two, can it be done via shell?

like image 894
Noitidart Avatar asked Feb 16 '14 13:02

Noitidart


1 Answers

New Correct Answer

Yes, directly!

Go to https://github.com/new/import and put in the URL of your gist and a name for your new repo.

I just put in https://gist.github.com/RichardBronosky/1aed6606b1283277e7ff9eaa18097e78 and AWS_subnets and it created https://github.com/RichardBronosky/AWS_subnets for me.

Important Feature Notes

  1. PRO: It keeps all previous commit history including commit messages
    • Many people don't realize that gist commits may have commit messages that you cannot see with the web interface. The gist above has 2 very decrsiptive commit messages that I commited on my local clone and pushed out. They are hidden from the gist web interface, but show up in clones and also new repos created using this import feature.
  2. PRO: It retains gist commits from other authors
  3. CON: In spite of #2, it shows only 1 contributor (which is myself).
  4. CON: Even though my gist shows "forked from nboubakr/subnet.py", this new/imported github repo does not show that it is a fork of anything (not nboubakr's gist nor my gist)

Verdict

This works very well and I really appreciate the PROs. The cons are not enough to make me think that some other method would be better.

I will use this extensively in the future because I often create a gist that answers some Stack Overflow question. Then I expand upon it and realize it should be a full repo. Not that I think my work is of great significance, but because I think my commit messages are worth sharing. And this is because I am lazy and tend to not want to create documentation that just repeats what i have already said in commit messages.

like image 72
Bruno Bronosky Avatar answered Sep 23 '22 13:09

Bruno Bronosky