Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8882133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:30:04+00:00 2026-06-14T20:30:04+00:00

I am going to be recruiting some developers for a project. I would like

  • 0

I am going to be recruiting some developers for a project. I would like to continue using the git repo if possible, but I would like to not make part of the history accessible (via encryption) so that only I can have acceess to it. The reason is that there is certain proprietary information in the history that I cleaned out in the head, such as account passwords that I hardcoded into the app during development. I do not want any other developer to see this without some form of authentication.

The obvious solution is to create a new repo off of this head, but I’d like to keep the full history if possible because it has branches that I may want to use down the road.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:30:06+00:00Added an answer on June 14, 2026 at 8:30 pm

    You cannot hide just a part of the history if a Git repository; due to the way Git works, with each commit including the hash of previous commits, in order use a Git repository you need to have the full history.

    However, you do have a few options. One would be to start a new repository with the current contents, and keep your old repository around. You can then give anyone who needs access to the old history the old repository. You can still view the full history across both repositories. You do this by adding remotes for each of the old and new, then using git replace to attach the last commit of the old repo to the first commit of the new. See the answer to this question for more details.

    Another option is to filter the history. You can use git filter-branch --tree-filter to run a script on each commit in your history, which replaces all instances of your passwords with something like “password”. This will preserve the full history, though all of your commits will get new commit IDs. See the answer to this question for more details.

    Both of these options will allow you to keep your full history, while not revealing your passwords. One thing to keep in mind if that they will change the actual commit IDs so you will need to make sure all of your working repositories are checked out from the new ones, not the old, or you could accidentally push the old history to one of your new repos. I would recommend changing any passwords that are in the old repo just in case, since once they are there, it may be easy to accidentally reveal them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Going through some of my older Delphi projects and upgrading them to D2009, as
Going through some documentation on modifying CGImageRef data, I came across a strange example
is there any way to overload the dot-operator . We would like to use
To make a long story short, it looks as if I am going to
Apart from rewriting a lot of XSLT code (which I'm not going to do),
I have a challenge I need some input on. I am currently recruiting programmers
I'm going to start a new project - rewriting an existing system (PHP +
I recently read on Meta about some browser not flushing their cache even after
I'm working with htaccess in a php application. I want some behavior like this:
I am working on a new PHP project and while I like TTD, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.