Init commit

This commit is contained in:
raccoon
2024-08-19 20:07:36 +05:00
commit ddd7506fc9
33 changed files with 2882 additions and 0 deletions

19
repo-discard.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh -e
repository="$(dirname "$(readlink -f "$0")")/."
cd "${repository}"
git rev-parse --is-inside-work-tree >/dev/null
echo "The following files were changed and will be reverted:"
git diff --name-only HEAD
printf "\nExecute [Y,N]?"; read -r yn
if [ "$yn" = "${yn#[Yy]}" ]; then
echo "Aborting restore..."
else
git restore "${repository}"
echo "Done."
fi
exit 0