Each time you change history, all transactions after the change will have new SHA1 amounts. If you just use a repo or a group of people with whom you can easily communicate, then you can safely filter or filter (see below) to clear the history, and then when they extract, they will need to manually reset all their branches to new heads. If this is not the case, then, unfortunately, you just have to live with it. Once a story is published, it cannot be changed.
git rebase. , . git filter-branch . , . , -subdirectory git (, , ), . , git filter-branch shell-script script , 'd . , . . , git -, , .