25 lines
388 B
Bash
25 lines
388 B
Bash
#!/bin/bash
|
|
# ___ _ _ _ __
|
|
# / __|| |_ | |_ ___ | '_ \ ___
|
|
# \__ \| _|| \ / _ \| .__// -_)
|
|
# |___/ \__||_||_|\___/|_| \___|
|
|
|
|
|
|
BRANCH_NAME="master"
|
|
|
|
if [ -n "$1" ]; then
|
|
BRANCH_NAME=$1
|
|
fi
|
|
|
|
git checkout --orphan latest_branch
|
|
|
|
git add -A
|
|
|
|
git commit -am "Initial Commit"
|
|
|
|
git branch -D $BRANCH_NAME
|
|
|
|
git branch -m $BRANCH_NAME
|
|
|
|
git push -f origin $BRANCH_NAME
|