From f3183328f239fc1c1eb5c5b5c761bb5173b1b49a Mon Sep 17 00:00:00 2001 From: Alpyne Date: Tue, 21 Jul 2020 21:25:08 -0700 Subject: [PATCH] Add git reset to create-branch.sh --- create-branch.sh | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/create-branch.sh b/create-branch.sh index 01a0923..85843a5 100755 --- a/create-branch.sh +++ b/create-branch.sh @@ -1,16 +1,17 @@ -#!/usr/bin/env bash - -# USAGE: bash create-branch.sh - -# new branch -echo "Creating branch '$1'" -git branch -D $1 || true -git checkout $2 $1 - -echo "Committing changes..." -git add src -git add client.txt -git commit -m "Update to $1" - -echo "Pushing to origin..." -git push --force origin $1 +#!/usr/bin/env bash + +# USAGE: bash create-branch.sh + +# new branch +echo "Creating branch '$1'" +git branch -D $1 || true +git checkout $2 $1 +git reset + +echo "Committing changes..." +git add src +git add client.txt +git commit -m "Update to $1" + +echo "Pushing to origin..." +git push --force origin $1