First of all, i've read all of the following:
- Is it possible to move a bunch of files from one git repository to another while preserving (most) history?
- Remove sensitive files and their commits from Git history
- Can I pull only certain files from another git repository?
I've been unable to get any of these solutions to work, possibly at least partially due to my unfamiliarity with advanced git
commands, such as git rebase
.
Background
For the past year, i've been volunteering with a few other programmers on a website for a NPO, written in go. In the process, i've developed a distributed, modular, multi-threaded, fault-tolerant web framework that is implemented using concurrent processes, combined with a reverse http proxy that dispatches to the various modules. The web framework is written by me, although there are modules written by the other programmers. All of our changes have been pushed to one central git repository, including the modules, framework, libraries (jQuery, tinymce, etc).
Given the extensive work involved in creating this framework, and the lack of such a solution for go programmers at the moment, I was considering releasing the project as open source. However, I only want to release the actual framework, not the modules, libraries, or other things that are sitting in the repo. In particular, there is at least one module that uses a hard-coded authentication key in order to access a web API, something that you would certainly not wish to have in a public release (although it's not enough of a security concern to be an issue for the other programmers working on the site). Additionally, the reverse http proxy checks a cookie's value in order to allow the entire site to be password-protected, with the cookie's value being hard-coded.
If possible, having the commit history from git would be an asset, as it would show people who are investigating the framework that it has a history, as well as showing them the evolution of it's design, and the design decisions involved.
Question
Using git
, how can I include only specific files, and the history of those specific files, when releasing a formally internal product as open source?
Bonus: Is there some way to not include the history for specific lines in a specific file (as well as removing the lines)?