Feature #9175
Create a Git repo with only the history and content of /blueprint
Start date:
2015-04-07
Due date:
% Done:
100%
Description
This involves creating a new Git repo that:
1. Only contains the blueprint directorie’s content.
2. Inherits the current Git repo’s history for that content, and nothing else.
git-filter-branch(1) should be a good start.
To rewrite the repository to look as if foodir/ had been its project root, and discard all other history:
git filter-branch --subdirectory-filter foodir -- --all
Subtasks
Related issues
Blocks Tails - Feature #9181: Deploy blueprints.tails.boum.org | Confirmed | 2015-04-07 | |
Blocks Tails - Feature #9179: Propose an ikiwiki configuration for blueprints.tails.boum.org | Confirmed | 2015-04-07 |
History
#1 Updated by sajolida 2015-04-07 17:29:57
- Subject changed from Rewrite the history of our main repo to keep only /blueprint to Create a Git repo with only the history and content of /blueprint
#2 Updated by sajolida 2015-04-07 17:30:59
- blocks Feature #9181: Deploy blueprints.tails.boum.org added
#3 Updated by sajolida 2015-04-07 17:34:22
- blocks Feature #9179: Propose an ikiwiki configuration for blueprints.tails.boum.org added
#4 Updated by sajolida 2015-05-04 03:15:30
- Target version deleted (
Tails_1.4)
#5 Updated by sajolida 2015-06-08 15:01:33
- Status changed from Confirmed to Resolved
- Assignee deleted (
sajolida)
I managed to do that with the following set of commands (could probably be refined):
git remote | while read remote ; do git remote rm $remote ; done
git branch | grep -v "\smaster" | while read branch ; do git branch -D $branch ; done
git tag | while read tag ; do git tag -d $tag ; done
git filter-branch --subdirectory-filter wiki/src/blueprint -- --all
git update-ref -d refs/original/refs/heads/master
git reflog expire --expire=now --all
git gc --aggressive --prune=now
#6 Updated by intrigeri 2015-06-10 16:25:11
- % Done changed from 0 to 100
Tested, works here too. We’re losing history before mid-2013 (since blueprints were elsewhere previously), but I think that’s fine. Yay!