Information about performing a git-commit-ectomy correctly. https://pages.charlesreid1.com/git-commit-ectomy/
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
Charles Reid c53362082c add some fixes to the TOC 2 yıl önce
docs add some fixes to the TOC 2 yıl önce
mkdocs-material @ b0c6890853 Update mkdocs-material for mkdocs 1.0 3 yıl önce
.gitignore adding mkdocs 3 yıl önce
.gitmodules adding mkdocs 3 yıl önce
LICENSE add license 3 yıl önce
README.md add some fixes to the TOC 2 yıl önce
memo update memo with notes 3 yıl önce
mkdocs.yml update docs with new images 2 yıl önce

README.md

git-commit-ectomy

Perform a git-commit-ectomy to forever remove problematic commits from your repo history.

This uses the git-forget-blob.sh script from @nachoparker.

git-commit-ectomy main banner image

what is this

This page covers how to perform a git-commit-ectomy.
This is a procedure that removes problematic files or
commits from your repository history.

For example, suppose the intern adds and commits a 1 GB
CSV file to your repository. After profusely apologizing,
the intern removes the 1 GB file, but the damage is done,
and the 1 GB file will forever bloat .git.

Enter the git surgeon. A git surgeon can remove such
problematic commits and get the commit history back in
shape.

Git College of Surgery on Github

the procedure

This surgical procedure can happen one of four ways:

consult with your doctor

You should consult with your doctor to determine if a
git-commit-ectomy is right for your repository.

This one-liner lists the 40 largest files in the repo
(modify the tail line to change the number of items
returned):

$ git rev-list --all --objects | \
     sed -n $(git rev-list --objects --all | \
     cut -f1 -d' ' | \
     git cat-file --batch-check | \
     grep blob | \
     sort -n -k 3 | \
     \
     tail -n40 | \
     \
     while read hash type size; do
          echo -n "-e s/$hash/$size/p ";
     done) | \
     sort -n -r -k1