Let’s assume you work on some client project. After a while you realize that the nice small tool you wrote is actually reusable and can/should be shared as opensource.
Now there are a two of possiblities:
- Copy the files and give a shit about the history
- Extract the history from an existing repo.
But how would you extract a history from an existing repo?
Extract history from existing repo.
Step 1: Clone the existing repo into a new one:
Step 2: Remove every commit beside the ones in the subfolder: