Skip to content

Is a deleted branch on GitHub guaranteed to not leak data? #70144

Discussion options

You must be logged in to vote

Hi @Utsuhoagie

Deleting a branch on GitHub does not guarantee that the data is completely gone and won't be accessible. While the branch itself may not be visible in the branch/commits view, the data may still be present in the Git history until it gets garbage collected. Here are your answers..

Git retains a history of all commits, including those in deleted branches. Until Git runs its garbage collection process, which may take some time, the commit history with the leaked secrets may still exist in the repository.
GitHub may also retain data for a certain period, even after a branch is deleted. This is part of their data redundancy and backup mechanisms.
If you make the repository publ…

Replies: 5 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@jsoref
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@vinaghost
Comment options

This comment was marked as off-topic.

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Security Build security into your GitHub workflow with features to keep your codebase secure Question
7 participants