{"id":1959,"date":"2021-07-01T10:18:43","date_gmt":"2021-07-01T10:18:43","guid":{"rendered":"https:\/\/gitprotect.io\/blog\/?p=1959"},"modified":"2024-03-08T12:05:45","modified_gmt":"2024-03-08T12:05:45","slug":"restoring-a-deleted-repository-in-github-and-bitbucket","status":"publish","type":"post","link":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/","title":{"rendered":"Restoring a Deleted Repository in GitHub and Bitbucket"},"content":{"rendered":"\n<p>Each of us certainly had a situation where we first got rid of some data, because we did not need it, but after some time we realized that we wanted to recover this data. It could be anything, an old note, a photo, or it can be an entire repository. Then what? We would like to recover this data somehow! Unfortunately, this is not always possible, so we should remember to regularly back up our data. Today we will talk about repositories and how we can recover them using two popular services &#8211; <a href=\"https:\/\/gitprotect.io\/blog\/git-battles-part-1-github-vs-bitbucket-what-to-choose-for-your-development-team\/\" target=\"_blank\" rel=\"noreferrer noopener\">GitHub and Bitbucket<\/a>.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\" id=\"let-s-delete-github-repository\"><strong>Let\u2019s <\/strong><strong>delete GitHub repository<\/strong><\/h2>\n\n\n\n<p>Before we figure out how to restore a repository, let&#8217;s first delete it. If you want to know more about removal, you should check out the article here: <a href=\"https:\/\/gitprotect.io\/blog\/how-to-delete-a-repository-in-github\/\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>How to delete a repository in GitHub<\/strong><\/a> But for now we don\u2019t need to know the details. Let me show you a simple scenario in GitHub.<\/p>\n\n\n\n<p>To remove a GitHub repository you need to open the settings of that one and scroll down. There you will find the section called \u201cDanger Zone\u201d which contains a few options. One of them is \u201cDelete this repository\u201d. So let\u2019s do that and remove it.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/vkdP96hdI2xC2nvFFsJ2Z_DwkmpdJ_kROsotZevEKInld9onwvZr96y5I2oaOtx6V8MswdiYFL8iiWTCmY2DA_qtM1yv8DBLA9jpwMLoIIhcVpr0XT1i8EIf0bADmC2BgwG8wK8\" alt=\"How to delete a GitHub repository\"\/><\/figure><\/div>\n\n\n<p>Now let\u2019s do the same with Bitbucket and then jump to the restoring topic. The story is similar. <strong>You need to open the repo, that you want to remove<\/strong>, move to the \u201cRepository settings\u201d section and then in the upper right corner click on the button &#8220;Manage repository&#8221;. It is a select field with two options: \u201cTransfer repository\u201d or \u201cDelete repository\u201d. Select the second one and then you will see this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/i0aYKAFe8wG_RrNFPxgabNTcO3ImJ_oEWXgbNSzMjB4Q4rXvgDFrB5b27x8iqKAv0_PsDtHJZdcr_Elk1XSvwpPwFTiQH3puKpF2x9rssgJE9IEjRZuukkFLIMYtT_qisR1rAQ4\" alt=\"Transfer or delete GitHub repository\"\/><\/figure><\/div>\n\n\n<p>All right, we\u2019ve done it. But be aware of the consequences. Deleting the repository is a permanent action and will remove all of its settings, comments, and so on. So be careful with this operation!&nbsp;<\/p>\n\n\n\n<p><em><strong>Visual learner?<\/strong> Then, don&#8217;t read but watch our GitProtect Academy video to find out how to restore a deleted repository in GitHub and Bitbucket (Psst, don&#8217;t forget to subscribe!)<\/em><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"atbs-responsive-video\"><iframe loading=\"lazy\" title=\"How To Restore A Deleted Repository In GitHub And BitBucket - GitProtect.io Academy\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/29Ed9ZZlfLg?list=PLG6ltpnBw0zG-UvV9nsyiNwobQNUYrlQX\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-restore-a-deleted-repository\"><strong>How to <\/strong><strong>restore a deleted repository<\/strong><\/h2>\n\n\n\n<p>What does \u201crestore\u201d actually mean? We&#8217;ve already established that deletion is permanent, so you might ask yourself &#8211; \u201cWhat&#8217;s this all about? How can I recover something that is permanently deleted? \u201d. Well, the answer is not that simple and it depends on what hosting service we use. For sure we will lose all information not directly related to our files, such as permissions, comments, labels etc. Let&#8217;s check how it works thoroughly.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/gitprotect.io\/sign-up.html\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-1024x536.png\" alt=\"Get free trial\" class=\"wp-image-2555\" style=\"width:512px;height:268px\" srcset=\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-1024x536.png 1024w, https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-300x157.png 300w, https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-768x402.png 768w, https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template-400x209.png 400w, https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2022\/03\/LinkedIn-ads-template.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>\n\n\n<p><strong>GitHub allows us to recover the repository within 90 days of its deletion<\/strong>. But there are a few things we need to know about this, especially if our repository was part of the <em>fork network<\/em>. What is that? The official documentation will explain to us:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>A fork network consists of a parent repository, the repository&#8217;s forks, and forks of the repository&#8217;s forks.<\/em><\/p>\n<\/blockquote>\n\n\n\n<p>Complicated? It may sound like that, but it is not. Now the important thing, which is why this definition is important. <strong>If our repo was part of such a network then it cannot be restored<\/strong>! Well, unless every other repository in the network would be deleted or detached, but that scenario is highly improbable and often it&#8217;s not up to us.<\/p>\n\n\n\n<p>In the documentation, we can find a mention that if we want to restore such a repository, if we cannot do it ourselves, we can contact GitHub Support on this matter, so let&#8217;s not lose hope. However, I do not recommend this type of solution because this way we lose control.&nbsp; And you cannot be 100% sure that the support could help you. We are dependent on others, and that is never a good thing when it comes to accessing our data.<\/p>\n\n\n\n<p>Okay, but let&#8217;s move on to the most important one, which is the answer to the question that led us here. To <strong>restore the deleted GitHub repository<\/strong>, we need to open the settings, go to the &#8220;Repositories&#8221; tab, then we will see something like this:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/pGopWvrNcnDJi0zlUHhseKOmignjxqviASWLYk9tTRDmHyMIDiepOtakGzm0I4p3MDdQhh_dwIW5LftVAr_AD3u8j5WWRi4QKbqIlUSkRCg7Vjx6SvBZOoWAfzF1ItFpzW3D618\" alt=\"restoring deleted repository\"\/><\/figure><\/div>\n\n\n<p>All of our deleted repositories will be listed under the &#8220;Deleted repositories&#8221; tab. Of course, all that were deleted no more than 90 days ago. Note the message on the blue background, GitHub informs us directly that the repositories belonging to fork network cannot be restored as I described above. Another important thing is the information about the time interval between deletion and restoration. You can test yourself, create a new repository, delete it, and then go straight to restoring. Spoiler alert &#8211; you will fail. But that shouldn&#8217;t be a problem, because <strong>if you want to restore the deleted repository, most likely it was removed much earlier than an hour ago<\/strong>.<\/p>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<p class=\"has-text-align-left\" style=\"font-size:22px\">How secure are your repos and metadata? Don&#8217;t push luck &#8211; <strong>secure your code with the first professional GitHub, Bitbucket, and GitLab backup<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button align=&quot;center&quot;\"><a class=\"wp-block-button__link has-background wp-element-button\" href=\"https:\/\/gitprotect.io\/sign-up.html\" style=\"border-radius:50px;background-color:#ff0300\" target=\"_blank\" rel=\"noreferrer noopener\">Start 14 days free GitProtect trial<\/a><\/div>\n<\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<div style=\"height:20px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"recovering-deleted-repository-in-bitbucket\"><strong>Recovering deleted repository in Bitbucket<\/strong><\/h2>\n\n\n\n<p>Now let&#8217;s check how it works in Bitbucket. At support.attlasian.com you can find a thread titled: <em><strong>\u201cCan I restore a deleted repository or commits?\u201d<\/strong><\/em><\/p>\n\n\n\n<p>What&#8217;s the official answer?<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><em>No. You are responsible for backing up your repository. Creating a regular backup can protect your repository from accidental, user-caused, data loss.<\/em><\/p>\n<\/blockquote>\n\n\n\n<p>End of story. This is a thread from Dec 2 2020 and nothing has changed since then. On the other hand, we can also find another thread on the same page, titled: <em>\u201c<\/em><em>Restore a deleted repository for Bitbucket<\/em><em> Server\u201d<\/em>.&nbsp;<\/p>\n\n\n\n<p>This thread describes two ways to recover a deleted repository, but it is not really recovery, understood in the same way as for example in GitHub. They require us to have a third-party <a href=\"https:\/\/gitprotect.io\/bitbucket.html\" target=\"_blank\" rel=\"noreferrer noopener\">Bitbucket backup<\/a>, which is already the first difference because it&#8217;s not Bitbucket that cares about it, but ourselves. The &#8220;recovery&#8221; process itself is actually creating a new repo from a backup or a local version of the repository &#8211; if there is one at all. Either way, we need to create a new, empty repository in Bitbucket, then set the appropriate <em>origin <\/em>address and perform a <em>push <\/em>operation that will restore the repository to us from the backup.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusions-restoring-a-deleted-repository-is-not-easy\"><strong>Conclusions<\/strong> &#8211; restoring a deleted repository is not easy<\/h2>\n\n\n\n<p>First of all, everything depends on the platform we use, but even the very friendly GitHub has some limitations related to it. Having our own backups and our own recovery procedures gives us peace of mind because we can keep them for as long as we want and restore them from any point in time to many destinations (the same or new repository, account, cross-over to another git hosting service or to your local machine). They also allow us to simplify the recovery procedures, which will certainly make our work easier. Although remember we can always run into some problems if our procedures are not up to date. So think over your decision a few times before you decide to delete the repository. Or at least have<a href=\"https:\/\/gitprotect.io\/azure-devops-backup.html\" target=\"_blank\" rel=\"noreferrer noopener\"> DevOps backup<\/a> in place then.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Each of us certainly had a situation where we first got rid of some data, because we did not need it, but after some time we realized that we wanted to recover this data. It could be anything, an old note, a photo, or it can be an entire repository. Then what? We would like to recover this data somehow! Unfortunately, this is not always possible, so we should remember to regularly back up our data. Today we will talk about repositories and how we can recover them using two popular services &#8211; GitHub and Bitbucket.<\/p>\n","protected":false},"author":6,"featured_media":1967,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,2,3],"tags":[],"class_list":["post-1959","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bitbucket","category-git-backup-101","category-github","post--single"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Restoring a Deleted Repository in GitHub and Bitbucket - Blog | GitProtect.io<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Restoring a Deleted Repository in GitHub and Bitbucket - Blog | GitProtect.io\" \/>\n<meta property=\"og:description\" content=\"Each of us certainly had a situation where we first got rid of some data, because we did not need it, but after some time we realized that we wanted to recover this data. It could be anything, an old note, a photo, or it can be an entire repository. Then what? We would like to recover this data somehow! Unfortunately, this is not always possible, so we should remember to regularly back up our data. Today we will talk about repositories and how we can recover them using two popular services &#8211; GitHub and Bitbucket.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog | GitProtect.io\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/XoperoSoftware\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-01T10:18:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-08T12:05:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Tomasz Lisowski\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@GitProtectio\" \/>\n<meta name=\"twitter:site\" content=\"@GitProtectio\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tomasz Lisowski\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/\"},\"author\":{\"name\":\"Tomasz Lisowski\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/9437be55e0e82150a20247f63e2fef79\"},\"headline\":\"Restoring a Deleted Repository in GitHub and Bitbucket\",\"datePublished\":\"2021-07-01T10:18:43+00:00\",\"dateModified\":\"2024-03-08T12:05:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/\"},\"wordCount\":1177,\"publisher\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png\",\"articleSection\":[\"Bitbucket\",\"Git Backup 101\",\"GitHub\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/\",\"url\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/\",\"name\":\"Restoring a Deleted Repository in GitHub and Bitbucket - Blog | GitProtect.io\",\"isPartOf\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png\",\"datePublished\":\"2021-07-01T10:18:43+00:00\",\"dateModified\":\"2024-03-08T12:05:45+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#primaryimage\",\"url\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png\",\"contentUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png\",\"width\":1200,\"height\":600,\"caption\":\"Restoring a deleted repository in GitHub and Bitbucket\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Strona g\u0142\u00f3wna\",\"item\":\"https:\/\/gitprotect.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Restoring a Deleted Repository in GitHub and Bitbucket\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#website\",\"url\":\"https:\/\/gitprotect.io\/blog\/\",\"name\":\"GitProtect.io Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/gitprotect.io\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#organization\",\"name\":\"GitProtect.io\",\"url\":\"https:\/\/gitprotect.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/favicon-528x528-1.png\",\"contentUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/favicon-528x528-1.png\",\"width\":528,\"height\":528,\"caption\":\"GitProtect.io\"},\"image\":{\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/XoperoSoftware\/\",\"https:\/\/x.com\/GitProtectio\",\"https:\/\/www.linkedin.com\/company\/xopero-software\/\",\"https:\/\/www.youtube.com\/channel\/UCiEnl6n0mIO6w7twccz-l2w\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/9437be55e0e82150a20247f63e2fef79\",\"name\":\"Tomasz Lisowski\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/tomasz-lisowski_avatar-96x96.jpg\",\"contentUrl\":\"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/tomasz-lisowski_avatar-96x96.jpg\",\"caption\":\"Tomasz Lisowski\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/tomasz-lisowski-01366a75\/\"],\"url\":\"https:\/\/gitprotect.io\/blog\/author\/tomasz-lisowski\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Restoring a Deleted Repository in GitHub and Bitbucket - Blog | GitProtect.io","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/","og_locale":"en_US","og_type":"article","og_title":"Restoring a Deleted Repository in GitHub and Bitbucket - Blog | GitProtect.io","og_description":"Each of us certainly had a situation where we first got rid of some data, because we did not need it, but after some time we realized that we wanted to recover this data. It could be anything, an old note, a photo, or it can be an entire repository. Then what? We would like to recover this data somehow! Unfortunately, this is not always possible, so we should remember to regularly back up our data. Today we will talk about repositories and how we can recover them using two popular services &#8211; GitHub and Bitbucket.","og_url":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/","og_site_name":"Blog | GitProtect.io","article_publisher":"https:\/\/www.facebook.com\/XoperoSoftware\/","article_published_time":"2021-07-01T10:18:43+00:00","article_modified_time":"2024-03-08T12:05:45+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png","type":"image\/png"}],"author":"Tomasz Lisowski","twitter_card":"summary_large_image","twitter_creator":"@GitProtectio","twitter_site":"@GitProtectio","twitter_misc":{"Written by":"Tomasz Lisowski","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#article","isPartOf":{"@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/"},"author":{"name":"Tomasz Lisowski","@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/9437be55e0e82150a20247f63e2fef79"},"headline":"Restoring a Deleted Repository in GitHub and Bitbucket","datePublished":"2021-07-01T10:18:43+00:00","dateModified":"2024-03-08T12:05:45+00:00","mainEntityOfPage":{"@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/"},"wordCount":1177,"publisher":{"@id":"https:\/\/gitprotect.io\/blog\/#organization"},"image":{"@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#primaryimage"},"thumbnailUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png","articleSection":["Bitbucket","Git Backup 101","GitHub"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/","url":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/","name":"Restoring a Deleted Repository in GitHub and Bitbucket - Blog | GitProtect.io","isPartOf":{"@id":"https:\/\/gitprotect.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#primaryimage"},"image":{"@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#primaryimage"},"thumbnailUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png","datePublished":"2021-07-01T10:18:43+00:00","dateModified":"2024-03-08T12:05:45+00:00","breadcrumb":{"@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#primaryimage","url":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png","contentUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2021\/07\/undo-del.png","width":1200,"height":600,"caption":"Restoring a deleted repository in GitHub and Bitbucket"},{"@type":"BreadcrumbList","@id":"https:\/\/gitprotect.io\/blog\/restoring-a-deleted-repository-in-github-and-bitbucket\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Strona g\u0142\u00f3wna","item":"https:\/\/gitprotect.io\/blog\/"},{"@type":"ListItem","position":2,"name":"Restoring a Deleted Repository in GitHub and Bitbucket"}]},{"@type":"WebSite","@id":"https:\/\/gitprotect.io\/blog\/#website","url":"https:\/\/gitprotect.io\/blog\/","name":"GitProtect.io Blog","description":"","publisher":{"@id":"https:\/\/gitprotect.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gitprotect.io\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/gitprotect.io\/blog\/#organization","name":"GitProtect.io","url":"https:\/\/gitprotect.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/favicon-528x528-1.png","contentUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/favicon-528x528-1.png","width":528,"height":528,"caption":"GitProtect.io"},"image":{"@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/XoperoSoftware\/","https:\/\/x.com\/GitProtectio","https:\/\/www.linkedin.com\/company\/xopero-software\/","https:\/\/www.youtube.com\/channel\/UCiEnl6n0mIO6w7twccz-l2w"]},{"@type":"Person","@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/9437be55e0e82150a20247f63e2fef79","name":"Tomasz Lisowski","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gitprotect.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/tomasz-lisowski_avatar-96x96.jpg","contentUrl":"https:\/\/gitprotect.io\/blog\/wp-content\/uploads\/2023\/05\/tomasz-lisowski_avatar-96x96.jpg","caption":"Tomasz Lisowski"},"sameAs":["https:\/\/www.linkedin.com\/in\/tomasz-lisowski-01366a75\/"],"url":"https:\/\/gitprotect.io\/blog\/author\/tomasz-lisowski\/"}]}},"_links":{"self":[{"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/posts\/1959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/comments?post=1959"}],"version-history":[{"count":13,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/posts\/1959\/revisions"}],"predecessor-version":[{"id":5115,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/posts\/1959\/revisions\/5115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/media\/1967"}],"wp:attachment":[{"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/media?parent=1959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/categories?post=1959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gitprotect.io\/blog\/wp-json\/wp\/v2\/tags?post=1959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}