summaryrefslogtreecommitdiff
path: root/artix/home/.local/bin/gitzero
blob: 6006f500c5397fbfaaf37424f42d1c425708ed72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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