Possible Duplicate:
How to open-source a project whose git repository has copyrighted media in the history?
Our company has spent a year working on an internal web application and has decided to open source the project and host on github. The application was originally versioned with Bazaar and we are going to preserve the commit history when converting it to git.
There is some confidential information within the commit history, such as internal database information.
Question:
Is there a way to preserve the commit history while removing or hiding all traces of confidential information?
The big reason being that we have had employees that have worked on the project that have moved on to higher-paying other jobs and we want to maintain recognition of their hard work.
5
GitHub has a help page on Removing sensitive data. This page describes in detail how to use git filter-branch
to remove old commits that have sensitive information.
This is the general workflow you can use:
- Convert the complete repository from Bazaar to Git.
- Identify commit(s) that have confidential information.
- Remove the confidential data with
git filter-branch
. - After you are satisfied that you have removed all the confidential information, then you can upload to GitHub.
To view the commit history, Git comes with the built-in gitk
tool. I normally use tig
which is a text mode repository viewer. There are many other possible repository viewers to choose from, your favourite IDE probably already has something built in.
0