Last active
July 9, 2019 09:20
-
-
Save VictorVelarde/95edcac9de9fdb17550123c803639087 to your computer and use it in GitHub Desktop.
Eliminar definitivamente fichero/s de repo GIT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Cuando se cuela en GIT un fichero no deseado, ocupando espacio o dando información inadecuada: | |
git filter-branch --index-filter "git rm --cached --ignore-unmatch path/to/BadFile" HEAD | |
-- si indica WARNING: Ref 'refs/heads/master' is unchanged --> no ha encontrado el fichero ni aplicado cambios, revisar ruta! | |
-- para poder repetir la operación con más ficheros, sucesivamente borrar las referencias de backup que deja | |
rm -rf .git/refs/original/ | |
-- para al final aplicar en 'origin': git push --force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment