feat(save-git-folder): add new command to save git refs to .gitmodules.csv and update help-table

This commit is contained in:
Janik von Rotz committed 2026-03-12 17:27:20 +01:00
1 parent b380826239
commit 760c5d8003
3 files changed
+18

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
save-git-folder() {
echo "Save git refs to .gitmodules.csv."
local git_folders=$(ls-git-folder .)
echo "path,rev" > ".gitmodules.csv"
for git_folder in $git_folders; do
local commit_ref=$(git -C "$git_folder" rev-parse HEAD)
echo "$git_folder,$commit_ref" >> ".gitmodules.csv"
done
}