How to delete a gist on GitHub? - github

Is there a way I can remove a gist on GitHub? Created a gist earlier, but don't really want it there anymore.

Currently:
There's a "delete" button at the top of each gist now:
Previously...
Previously there was "delete this gist" link at the bottom of the gist's page, as below - thanks to Daniel Smith for pointing out in the comments below that this has been changed.

I created a tool which can help you delete multiple github gists both secret and public gists at once. https://gist-cleaner.ndolestudio.com
It's open source, you can find the source code here https://github.com/NdoleStudio/gist-cleaner

Related

Pull Requests: Referencing code in comment replies

I know you can go to the files section of a PR and click to add a comment that references code. But is there any markdown or other method that lets you add a reference to some code in the replies to comments?
note: I mean referencing code from a file, not just pasting in the code. I'd like the code to update dynamically similar to code referenced when creating a comment with a file/line reference.
Here is a statement in Syntax guidance for basic Markdown usage: Note: Code attachments aren't permitted in PR comments
So I am afraid it is not support in Markdown.
You can try to click the "Copy link to this selection" option for a piece of code in a file and then insert the generated link into the comment reply to achieve the reference.

How to use GitHub to make a public gist? What is the procedure?

I want to create a public gist in GitHub. I've been on YouTube and in Google search but have not found an answer to this question. And I don't see an answer in Stackoverflow to this question. This my seem trivial to some of you but I'm not so savvy in the tech world. I have a GitHub account. I did the tutorial in the Read Me Guide where I learned about repositories, branch, commit and pull request. I was in StackExchange chat room where someone asked me to make a public gist of my code that I was asking help with. Now I want to create a public gist of my code. On the Gist page I see a place to where I think the code is suppose to go. I see an Add File tab. But nothing happens when I click on it.The app won't let me just paste in my code. I see a place for a gist description. And I see a place for a file name including extension. But how do I place my code to create a public gist? Where does it go? Somebody help, please. After some more searching I think I got an answer. A Gist is just a repository. Am I right or wrong?
Assuming that you are logged in on GitHub:
Visit the Gist page
Paste your code in the text box directly underneath where it lets you set a file name;
Then press 'create public gist' in the bottom right.
For more information on this, visit the official docs.
If you want to create public gist repository on github then following steps are there,
There is a GithubHist(https://gist.github.com/) available to share you code publicly over the internet.
One of the advantage to use this is that when you create repository in GithubHist, one same repository will be created on https://bl.ocks.org
This will run your code and show output to the user.
Steps to use GithubHist
Login on Github.
There is a Gist option on top of then menu. Click on this.
It will redirect you on https://gist.github.com/
Here in Gist description give Title of your project.
Now create index.html file. This file runs by default when you go on https://bl.ocks.org with your repository location.
Now you can add as many files that you need in your project here.Just click on add file.
To add License,you need to add license.txt file and add contents of the license.
At last click on “Create public gist” or “Create Secret gist” option at bottom.
To add Background image of your project on https://bl.ocks.org
Get git clone of project to your local machine.
Create file with name “thumbnail.png” with dimension 230px * 120px.
Add this file to your project.
Commit and Push changes.
It’s Done now.
Check your Project with links
https://gist.github.com/yourName/ProjectId Source of project
https://bl.ocks.org/yourName/ProjectId output of project with source
Please see my blog on medium
https://medium.com/#thakkarchintu5/using-githubgist-on-github-f4f0944bbc80
also check gist repository that I have created
https://bl.ocks.org/ChandrakantThakkarDigiCorp

View issues that are assigned to me?

I've checked the GitHub docs but can't find this. I've also googled this but can't find an answer.
How can I see all issues for all my repositories that have been assigned to me on the GitHub website?
It sounds like you're looking for https://github.com/issues/assigned.
The easiest way to get there is to click on the Issues link at the top right of the GitHub UI, and then the Assigned tab at the left side of the screen:
You can also use the assignee key in the search bar manually, e.g. assignee:panthro.
6 years later (January 2020), you also have the #me search syntax.
See "Search by #me"
That means Chris' screenshot of the "Issues" search field would now read:
state:open is:issue assignee:#me
No need for "assignee:myuser"

github link to wiki page from README

How do I create a link from a README.md file to a Wiki page in github? Every example seems to show linking from one wiki page to another wiki page, or from one README file to another file in the repository. But none that show linking from one to the other
I just came across this question and saw that this was impossible, but stubbornly kept trying anyway. Good news, because this actually can be done with relative links!
If you look at the documentation for relative links on GitHub, you can see that it supports ./ and ../ operands.
Given that your README is located at:
https://github.com/<user-name>/<repo-name>/blob/master/README.md
... and the wiki is located at:
https://github.com/<user-name>/<repo-name>/wiki
... that means you can just crawl back from the README to the wiki, like so:
[My Awesome Wiki](../../wiki)
Update: As some people have pointed out in the comments (thanks!), please be aware that these relative links will break on clones and forks, so be sure to weigh that into your decision!
You would have to use an absolute URL as opposed to a relative one.
For example:
[Sites Using React](https://github.com/facebook/react/wiki/Sites-Using-React)
I found that I needed to crawl back 3 levels versus 2 levels as descreibed in jmar777's approach.
When I used
../../wiki
The link generated was https://github.com/<username>/blob/wiki
I needed to use:
../../../wiki
This generated https://github.com/<username>/wiki
I am using GitLab. My link to my Wiki page looks like this.
Checkout the [Wiki page](/%2E%2E/wikis/Welcome)
I tried the other recommendations that are posted here but it kept changing the URL with re-writes that broke the link.
Just to add on this one, if you want to refer to your repo file from inside wiki use ../../blob/master/. Combined with the answer from jmar777 this allows to completely integrate code and wiki and remove a need for bloated readme.md.
To make it work locally as well as your file structure would have to be
./Wiki/YourWikiRepo
./blob/master/YourCodeRepo

How can I change a secret Gist to public?

I've uploaded a Github Gist and I've set it to be secret.
Now I want to change the gist to public, but I can't find how to set it public.
Could anyone help me about that?
I upload a Gist code and set it to be secret.
Now I want to change the gist to public, but I can't find how to set it public.
Since May, 9th 2014, it is possible: "Change the visibility of your Gists"
You can change the visibility of your Gists whenever you want.
When editing a Gist you'll now notice a new option to toggle the visibility between Public and Secret.
The URL for your Gist will never change, just its visibility.
As commented by GiDo though, since 2016:
you can only make public a gist that was previously private.
When it is public it will stay public.
This is confirmed in "Creating gists"
After creating a gist, you cannot convert it from public to secret.
Update:
You can still convert a secret gist to a public gist by first selecting "Edit" -> "Make Public". This feature has been partially rolled back, however, since 12/15/16 and you will no longer be able to switch it back to secret.
From the docs:
After creating a gist, you cannot convert it from public to secret.
Correction; this information is outdated. See VonC's answer from May 9, 2014.
Original answer:
No, you'll have to create a new public gist and copy/paste the contents.
If you want to preserve all of the history of the original secret gist, Chris Dzombak has written an article walking you through how to clone a gist, step-by-step, to preserve its change history.