I made a mistake and created a pull request that I didn’t mean to submit. I closed it right away but now I’m wondering if there’s a way to get rid of it entirely.
The problem is that even though it’s closed, people can still find it if they have the direct link. It also appears in my GitHub activity feed which is kind of embarrassing.
Is there any method to permanently delete a pull request so that it disappears from GitHub completely? I want it removed from both the URL access and my profile activity timeline.
Nope, GitHub doesn’t let you delete pull requests once they’re created. Found this out the hard way after accidentally submitting a PR with sensitive config info in the commit messages. Even if you close it immediately, the PR stays in the repo’s permanent record. Your best bet is editing the title and description to something generic like “Test PR - please ignore.” Won’t remove it from your activity feed, but makes it less obvious if someone finds it. The direct link still works though - can’t do anything about that. GitHub keeps PRs as historical records for transparency, so there’s no way to completely purge them.
ugh, super frustrating but you’re stuck with it. github doesn’t let anyone delete PRs - not even repo owners. i’ve been there when i accidentally pushed personal stuff to a work project. your only option is making the repo private if you own it. that’ll hide the PR from public view.
yeah, i get how that feels. unfortunately, there’s no way to fully delete a closed pull request. it stays in the system. you could try changing the title or description to something less cringey tho, just to make it less awkward.
Same thing happened to me a few months back - created a PR for the wrong project by mistake. I checked GitHub’s docs and contacted support, but you can’t delete pull requests once they’re submitted. GitHub treats PRs like permanent records (similar to git commits) to preserve project history. I just edited the description to explain my screwup, which might help anyone who stumbles across it later. The PR will fade from your activity feed as you do more stuff, but it’s stuck there forever. Annoying, but that’s how it works.