Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
    
Is you problem the identification of confidential information, or the mechanical process of changing the identified commits? –  mattnz Jan 8 '13 at 20:12
    
Mostly the mechanical process of changing the identified commits. If you know of a nice UI for examining the commit history, that would be very helpful as well. –  OozeMeister Jan 8 '13 at 20:15
2  
Their hard work was recognised by a monthly paycheque. –  James Jan 9 '13 at 0:28
2  
Cannot understand the close votes. This question, while specific in it's current form, covers a common issue for software developers - removing (confidential) information from source control. –  mattnz Jan 9 '13 at 2:48
add comment

marked as duplicate by gnat, Martijn Pieters, Karl Bielefeldt, Carson63000, BЈовић Jan 17 '13 at 7:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 7 down vote accepted

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:

  1. Convert the complete repository from Bazaar to Git.
  2. Identify commit(s) that have confidential information.
  3. Remove the confidential data with git filter-branch.
  4. 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.

share|improve this answer
    
gitk looks awesome! Thanks a lot! –  OozeMeister Jan 9 '13 at 19:28
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.