Add git-cat-file-for-each-branch.sh and git-lfs-undo.sh in scripts/shell/job

This commit is contained in:
Matheus Albino Brunhara
2024-04-04 13:31:20 -03:00
parent 713fffee96
commit fdbc3d2151
2 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#!/bin/bash
filename=$1
repo_dir=`pwd`
for branch in $(git for-each-ref --format='%(refname)' refs/remotes/origin); do
cmd_out=`git show $branch:$filename`
if [ $? -ne 0 ]; then
cmd_out="[$branch] O arquivo \"$filename\" não existe no branch"
else
echo "[$branch] Arquivo:"
echo "$cmd_out"
fi
printf "\n"
done