CGS
CGS

Reputation: 2872

git fork - Delete file from History in all forks of my repository

I have a repository in my git ( Github). Lots of people have created forks from my repository

Now, I would to remove a file from my git, so I executed the following series of commands

git filter-branch --force --index-filter 'git rm --cached -r --ignore-unmatch <<filename>>' --prune-empty --tag-name-filter cat -- --all
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now
git gc --aggressive --prune=now
git push --all --prune --force

After running above series of commands, I can see the file has been deleted from git history

But still people who have forked it will have the file available. Is there an option as a repository owner to delete this file from the forked repo as well?

Upvotes: 1

Views: 832

Answers (1)

CGS
CGS

Reputation: 2872

Thanks @phd. There is no way to edit once user forks from a git repository

Upvotes: 1

Related Questions