diff options
Diffstat (limited to 'artix/home/.local/bin/gitzero')
| -rwxr-xr-x | artix/home/.local/bin/gitzero | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/artix/home/.local/bin/gitzero b/artix/home/.local/bin/gitzero new file mode 100755 index 0000000..6006f50 --- /dev/null +++ b/artix/home/.local/bin/gitzero @@ -0,0 +1,18 @@ +#! /bin/sh + +read -p "You really want to nuke your remote repo? (yes/no) $(git remote get-url origin) " confirmation + +if [ "$confirmation" = "yes" ]; then + mv .git/config . + rm -rf .git + git init + rm .git/config + mv config .git/ + echo "I will push to :" + git remote get-url origin + git add . + git commit -m "Initial commit" + git push -u --force origin main +else + echo "Abort." +fi |
