[英]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.我有一堆以 Gist 形式制作的模板,以便人们可以在底部讨论它们。
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?
是否可以通过 GitHub 站点或客户端将 Gist 分叉到 Repo? If not either of those two, can it be done via shell?
如果不是这两者中的任何一个,可以通过shell完成吗?
Yes, directly!对,直接!
Go to https://github.com/new/import and put in the URL of your gist and a name for your new repo.转到https://github.com/new/import并输入您的要点的 URL 和新存储库的名称。
I just put in https://gist.github.com/RichardBronosky/1aed6606b1283277e7ff9eaa18097e78 and AWS_subnets and it created https://github.com/RichardBronosky/AWS_subnets for me.我刚刚输入了https://gist.github.com/RichardBronosky/1aed6606b1283277e7ff9eaa18097e78和 AWS_subnets,它为我创建了https://github.com/RichardBronosky/AWS_subnets 。
This works very well and I really appreciate the PROs.这非常有效,我非常感谢 PRO。 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.我将在未来广泛使用它,因为我经常创建一个回答一些 Stack Overflow 问题的要点。 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.
这是因为我很懒惰,并且往往不想创建只重复我在提交消息中已经说过的内容的文档。
Is it possible to fork a Gist to Repo via the GitHub site or client?
是否可以通过 GitHub 站点或客户端将 Gist 分叉到 Repo?
Not directly.不直接。
You can try to add a bookmarklet like " Fork your own Gist ".您可以尝试添加像“ Fork your own Gist ”这样的书签。
But there won't be any pull request feature .但是不会有任何拉取请求功能。
If that becomes an issue, it is better to create a full-fledged GitHub repo out of your Gist collection of files.如果这成为一个问题,最好从您的 Gist 文件集合中创建一个完整的 GitHub 存储库。
(As in " Transfer gist repo into a github one "). (如“将 gist repo 转移到 github one ”中那样)。
Since my original answer in 2014, the ability to fork a gist (as mentioned in Bruno-Bronosky 's answer ) was added (around 2015).自从我在 2014 年的原始答案中,添加了分叉要点的能力(如Bruno-Bronosky的答案中所述)(大约在 2015 年)。
Each gist indicates which forks have activity, making it easy to find interesting changes from coworkers or complete strangers.
每个要点都指示哪些分叉有活动,从而可以轻松地从同事或完全陌生的人那里找到有趣的变化。
See for instance " A basic collaboration workflow on Gist " (Apr. 2015) from Giovanni Cappellotto ( potomak
on GitHub).例如,参见Giovanni Cappellotto (GitHub 上的
potomak
)的“ Gist 上的基本协作工作流程”(2015 年 4 月)。
Again, there is no direct pull request supported (still valid in 2020).同样,不支持直接拉取请求(2020 年仍然有效)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.