feat(save-git-folder): add new command to save git refs to .gitmodules.csv and update help-table
This commit is contained in:
3 files changed
+18
No files matched your search
Executable
+12
@@ -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
|
||||
}
|
||||
Reference in new issue
Block a user