feat(git): add comprehensive git folder management commands and update documentation

This commit is contained in:
Janik von Rotz committed 2026-03-04 09:36:40 +01:00
1 parent 793b608732
commit 84f7ebfccb
15 files changed
+342 -10

No files matched your search

+5 -4
View File
@@ -1,9 +1,10 @@
#!/usr/bin/env bash
#!/usr/bin/env bash
ls-git-folder() {
[[ -z "$1" ]] && { echo '$1 is empty.' >&2; return 1; }
if [[ -z "$1" ]]; then
echo '$1/path is empty.'
exit
fi
[[ ! -d "$1" ]] && { echo "Error: '$1' is not a directory." >&2; return 1; }
local excludes="${GIT_FOLDER_EXCLUDE:-.cache,node_modules,venv,__pycache__,.vim,.fzf,.password-store,.oh-my-zsh}"
@@ -18,6 +19,6 @@ ls-git-folder() {
find_cmd="$find_cmd -type d -name '.git' -print"
eval "$find_cmd" 2>/dev/null | while IFS= read -r git_dir; do
dirname "$git_dir"
[[ "$git_dir" != "./.git" ]] && dirname "$git_dir"
done
}