git log --pretty=format: --name-status
}
-git_history_clean() {
+git_clean() {
+ git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin
+ git reflog expire --expire=now --all
git gc --prune=now --aggressive
}
)
}
+git_push_origin() {
+ git push origin --force --all || return
+ git push origin --force --tags || return
+}
+
+git_rm_file() {
+ git filter-branch --force --index-filter "git rm --cached --ignore-unmatch $1" --prune-empty --tag-name-filter cat -- --all
+}
+
# NB 12.01.18 git_clone_and_clean() {
# NB 12.01.18 local usage="git_clean_repo REPO"
# NB 12.01.18 local repo=${1:-?$usage}
# NB 12.01.18 git gc --aggressive --prune=now || return
# NB 12.01.18
# NB 12.01.18 echo "Push the cleaned repository"
-# NB 12.01.18 git push origin --force --all || return
-# NB 12.01.18 git push origin --force --tags || return
+# NB 12.01.18 git_push_origin
# NB 12.01.18 )
# NB 12.01.18 rm -rf "$tmp"
# NB 12.01.18 }