Files
k3s/docs/herramienta git-chilremove.md
2025-04-27 21:55:49 +00:00

32 lines
733 B
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 🛠Creacion de herramienta git-childremove
Git-childremove es una herramienta para eliminar los git de las carpetas hijas
## 1. Crea el script
Copia este contenido en ~/bin/git-childremove (crea la carpeta ~/bin si no existe):
#!/bin/bash
echo "🔍 Buscando carpetas .git en subdirectorios..."
find . -mindepth 2 -type d -name ".git" | while read gitdir; do
echo "🗑️ Eliminando $gitdir"
rm -rf "$gitdir"
done
echo "✅ Todas las carpetas .git han sido eliminadas."
Hazlo ejecutable:
chmod +x ~/bin/git-childremove
## 2. Añade ~/bin a tu PATH si no lo tienes
Edita ~/.bashrc (o ~/.zshrc si usas Zsh) y añade:
export PATH="$HOME/bin:$PATH"
Y recarga:
source ~/.bashrc