Search code examples
githubpermalinks

Github Delete permanent link (permalink)


I have created a GitHub permanent link.

I want to delete this "Permalink" so it stops pointing to the file.

Is there a way to accomplish this?

[Update]

I added an API key to a commit and pushed it to the branch. The project is public and now after I realized my error I want to see if there is a way to fix it, I mean avoid sharing the API key


Solution

  • Permalinks can be created by and are visible to anyone who has access to the repository. That particular URL syntax where the full object ID is in the URL, is but one of many ways to express an equivalent URL, which can have almost any valid (to Git) expression in its place. Anyone who is visiting that particular page could press y and generate the exact same URL, and they could have written the same thing by hand without pressing y and it would have worked anyway.

    So, no, it's not possible to delete the URL, since it hasn't been specially created and has been valid as long as that commit has existed in the repository. However, if you're concerned about whether others who don't have access to the repository can see it, they cannot. The link will only work for people who could normally access the repository.