8f45b40528
12 funciones Bash del dominio shell: utilidades de scripting (bash_log, bash_colors, bash_check_deps, bash_confirm, bash_handle_error, bash_safe_run), manipulacion de texto (convert_text_case), estructura de proyectos (create_project_structure), y operaciones git (git_clean_branches, git_log_visual, git_push_all_remotes, git_repo_status). Cada una con su .sh y .md de frontmatter.
1.6 KiB
1.6 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path, source_repo, source_license, source_file
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | source_repo | source_license | source_file | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| git_clean_branches | function | bash | shell | 1.0.0 | impure | git_clean_branches([base_branch: string], [--remote], [--force]) -> void | Elimina ramas locales ya mergeadas en la rama base (autodetecta main/master). Con --remote también borra las ramas en todos los remotes. Con --force omite la confirmación interactiva. |
|
false | error_go_core |
|
lista de ramas eliminadas a stdout; exit code 1 si no es repo Git o no se detecta la rama base | false | bash/functions/shell/git_clean_branches.sh | https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/egutierrez/DevLauncher.git | MIT | scripts/linux/git_utils/limpiar_ramas.sh |
Ejemplo
source bash/functions/shell/git_clean_branches.sh
# Limpieza básica con confirmación
git_clean_branches
# Sin confirmación, sobre rama base "develop"
git_clean_branches develop --force
# Eliminar también en remotes
git_clean_branches main --remote --force
Notas
Ramas protegidas que nunca se eliminan: main, master, develop, dev, staging, release. Siempre hace prune de referencias remotas obsoletas antes de buscar candidatos.