Add git reset to create-branch.sh
This commit is contained in:
parent
0a7f8ef6d0
commit
f3183328f2
|
@ -1,16 +1,17 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# USAGE: bash create-branch.sh <version> <branch_flags>
|
# USAGE: bash create-branch.sh <version> <branch_flags>
|
||||||
|
|
||||||
# new branch
|
# new branch
|
||||||
echo "Creating branch '$1'"
|
echo "Creating branch '$1'"
|
||||||
git branch -D $1 || true
|
git branch -D $1 || true
|
||||||
git checkout $2 $1
|
git checkout $2 $1
|
||||||
|
git reset
|
||||||
echo "Committing changes..."
|
|
||||||
git add src
|
echo "Committing changes..."
|
||||||
git add client.txt
|
git add src
|
||||||
git commit -m "Update to $1"
|
git add client.txt
|
||||||
|
git commit -m "Update to $1"
|
||||||
echo "Pushing to origin..."
|
|
||||||
git push --force origin $1
|
echo "Pushing to origin..."
|
||||||
|
git push --force origin $1
|
||||||
|
|
Loading…
Reference in New Issue