Supprimer un répertoire/fichier de tout l’historique d’un dépôt GitRemove a directory/file from Git history

You can remove the directory Junk from your Git repository and its history using the following command:

git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch Junk" HEAD

and by then updating the references:

rm -Rf .git/refs/original
rm -Rf .git/logs/
git gc