Is there an expiry time on restoring a deleted branch in a merged PR? #23262
-
I have a collaborator who is nervous about the longevity of the ‘restore’ functionality of deleted branches in merged PRs. Can anyone provide some clarity as to how long a merged and deleted PR branch is retained for restoring? I was under the impression that one can restore a deleted PR branch indefinitely, but I can’t find confirmation of that on the GitHub support pages. The only information is second-hand, a quote from a GitHub helpdesk reply from 2013 in this StackOverflow answer:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I don’t have a very satisfying answer for you I’m afraid. The branches will be restorable indefinitely, unless the repository cache is cleared. We don’t clear repository caches automatically (we’re in the version control business, so we don’t delete data unless we absolutely have to 😉) so usually the only reason we would do that is if we had someone writing in to us asking for us to clear them as part of the sensitive data removal process (Step 8). It’s also possible we might clear the cache for technical reasons, if the content or structure of the repo was causing us difficulties to host it, but that would usually only happen if the repo was exceptionally large or had a wildly structured folder layout. Sorry I don’t have a better answer for you! |
Beta Was this translation helpful? Give feedback.
-
Thanks @that-pat, that’s very helpful indeed. |
Beta Was this translation helpful? Give feedback.
I don’t have a very satisfying answer for you I’m afraid. The branches will be restorable indefinitely, unless the repository cache is cleared.
We don’t clear repository caches automatically (we’re in the version control business, so we don’t delete data unless we absolutely have to 😉) so usually the only reason we would do that is if we had someone writing in to us asking for us to clear them as part of the sensitive data removal process (Step 8).
It’s also possible we might clear the cache for technical reasons, if the content or structure of the repo was causing us difficulties to host it, but that would usually only happen if the repo was exceptionally large or had a wildly structured…