Hacker News new | past | comments | ask | show | jobs | submit login

Out of curiosity, If I were running my own git server can I delete a PR completely?



Git itself doesn't have a concept of pull requests; you are expected to just send a request for someone with access to the remote repository to do the pull themselves. Someone with access to the remote repository would need to take some action themselves before anything is actually downloaded to it.

Once the contents of the PR are in the remote repository, it is possible to completely delete them. First, you need to make them unreachable by any reference (which is to say, not in the history of any branch or tag). Then you can run the git garbage collector to actually delete the commits associated with the PR.

I don't think there is any way to tell the garbage collector to prune specific commits; so you will also loose any other orphan commits; but that probably isn't a problem.


Pull requests aren't a part of git. They're a part of GitHub.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: