powerpoint2git/hooks/post-commit.disabled
2023-02-24 16:27:12 +01:00

20 lines
No EOL
430 B
Bash

#!/bin/sh
echo "Ich bin der Post Commit und jetzt disabled"
#chmod -x .git/hooks/post-commit # disable hook
mv .git/hooks/post-commit .git/hooks/post-commit.disabled
for f in $(cat .changes)
do
echo "File: $f"
git rm --cached $f
new_dir=".$(basename $f)"
new_path="$(dirname $f)/$new_dir"
git add $new_path
done
rm .changes
echo "Jetzt das amend"
git commit --amend --reuse-message=HEAD --no-verify
echo "End post commit"