0

I have a private gitlab repository with hundreds of commits, issues, etc. Unfortunately the first 5 commits of the repository contains some private data.

So I would like to clone the existing repository to preserve history/issues/etc but starting from the 6th commit.

Is this possible?

YesThatIsMyName
  • 1,585
  • 3
  • 23
  • 30
matteo
  • 4,683
  • 9
  • 41
  • 77
  • 1
    https://stackoverflow.com/questions/9725156/remove-old-git-commits, https://stackoverflow.com/questions/6870581/delete-earlier-commits-in-git, https://stackoverflow.com/questions/29741476/how-do-i-properly-remove-sensitive-data-pushed-to-a-git-repo, https://stackoverflow.com/questions/872565/remove-sensitive-files-and-their-commits-from-git-history – CodeCaster Jan 11 '19 at 07:34

1 Answers1

2

Your question may have a specific solution, but by having private information, it is best to contact support Github support@github.com through an email indicating that you want to delete a series of commits by having private information and indicating the details.

If you wish ,you can follow the next tutorial from Github here, but according to the same Github:

Warning: Once you have pushed a commit to GitHub, you should consider any data it contains to be compromised. If you committed a password, change it! If you committed a key, generate a new one.

This article tells you how to make commits with sensitive data unreachable from any branches or tags in your GitHub repository. However, it's important to note that those commits may still be accessible in any clones or forks of your repository, directly via their SHA-1 hashes in cached views on GitHub, and through any pull requests that reference them. You can't do anything about existing clones or forks of your repository, but you can permanently remove cached views and references to the sensitive data in pull requests on GitHub by contacting GitHub Support or GitHub Premium Support.

Good luck!!!!!

Nicolás Alarcón Rapela
  • 2,714
  • 1
  • 18
  • 29