/
hubbitus
/
shell.scripts
Обзор
Документация
Войти
/
hubbitus
/
shell.scripts
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
git.filter.out
16 строк
586 B
Pavel Alexeev
Add debug possibility into git.filter
23 окт 2019, 00:05
23 окт 2019, 00:05
6dac2e8
Код
Авторство
О чём код?
#!/bin/bash : ${1?"Not enough arguments: `basename $0` filter-regex-of-files-GONE-in-project F.e. filter may be like: '^SPECS/zram.spec$', or just: 'zram' if you want simple match in any part of path. This is opposite to git.filter!"} # http://stackoverflow.com/questions/5998987/splitting-a-set-of-files-within-a-git-repo-into-their-own-repository-preserving git filter-branch -f \ --prune-empty \ --index-filter ' git ls-tree -z -r --name-only --full-tree $GIT_COMMIT \ | egrep -z "'$1'" \ | xargs -0 -r git rm --cached -r ' \ -- \ --all