Hi
We have a file with the user name and password and some text in a repo.
we committed that repro later we under we should not put password public.
So we made changes to the file and removed the password.
But still, if we open the file history/versions if we check the old version the password will be still avalibile.
since we need to restrict that version to be accessed by users.
Hi @Raj Kumar Samakari and welcome to the community.
It is not possible to restrict access to certain files or commits in a repo.
My suggestion would be rewriting history to remove this file from the repo's history (and afterwards commit it again, without the password).
One tool you could use for removing the file from the repo's history is BFG:
If you check the examples on that page, it is possible to use it with the flag --delete-files in order to delete the file from the repo's history.
Please note:
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.