Skip to content

Instantly share code, notes, and snippets.

@therealdreg
Last active August 21, 2022 07:52
Show Gist options
  • Save therealdreg/b6c0dbb30117335a6a2f306a94198492 to your computer and use it in GitHub Desktop.
Save therealdreg/b6c0dbb30117335a6a2f306a94198492 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# ~/.bash_profile
# alias giterminator=~/giterminator.sh
set -x
args=$*
if [ -z "$1" ]
then
args='first version'
fi
git checkout --orphan orphan_name
git add -A
git commit -am "$args"
git branch -D main
git branch -m main
git push -f origin main
git gc --aggressive --prune=all
git branch --set-upstream-to=origin/main main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment