Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/concretecms/incremental-filter-branch
A script that applies git filter-branch in an incremental way
https://github.com/concretecms/incremental-filter-branch
bash filter-branch git incremental posix-sh subtree-split
Last synced: about 1 month ago
JSON representation
A script that applies git filter-branch in an incremental way
- Host: GitHub
- URL: https://github.com/concretecms/incremental-filter-branch
- Owner: concretecms
- License: mit
- Created: 2018-03-18T21:53:40.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-29T18:11:12.000Z (about 1 year ago)
- Last Synced: 2024-11-14T09:12:14.945Z (about 1 month ago)
- Topics: bash, filter-branch, git, incremental, posix-sh, subtree-split
- Language: Shell
- Homepage:
- Size: 69.3 KB
- Stars: 4
- Watchers: 7
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![TravisCI Build Status](https://travis-ci.org/concrete5/incremental-filter-branch.svg?branch=master)](https://travis-ci.org/concrete5/incremental-filter-branch)
## Introduction
[`git filter-branch`](https://git-scm.com/docs/git-filter-branch) is a really nice git feature.
For instance, it allows fancy stuff like subtree-splitting.Problems may arise when the repository contains a lot of commits: this operation can take a lot of time.
Luckily recent versions of git allow us to perform this operation in an incremental way:
the first time `filter-branch` still requires some time, but following calls can be very fast.## Requirements
- git 2.16.0 or newer
- common commands (`sed`, `grep`, `md5sum`, `cut`, ...)## Usage
Get the script and read the syntax using the `--help` option.
## Examples
```sh
./bin/incremental-git-filterbranch \
--branch-whitelist 'develop master rx:release\/.*' \
--tag-blacklist 'rx:5\..*' \
--tags-plan all --tags-max-history-lookup 10 \
https://github.com/concrete5/concrete5.git \
'--prune-empty --subdirectory-filter concrete' \
[email protected]:concrete5/concrete5-core.git
```## Legal stuff
Use at your own risk.
[MIT License](https://github.com/concrete5/incremental-filter-branch/blob/master/LICENSE).## Credits
Special thanks to [Ian Campbell](https://github.com/ijc) for the implementation of the `--state-branch` option of git,
and his hints about how it can be used.
This script works only thanks to him (and if it doesn't work I'm the only person to blame).