myhome/.local/bin/gswitch
Marcin Woźniak 083810dc04 Added into a gswitch new command
Signed-off-by: Marcin Woźniak <marcin.wozniak@wundermanthompson.com>
2023-09-20 13:56:11 +02:00

8 lines
170 B
Bash
Executable File

#!/bin/bash
BRANCH=$1
git checkout -b "$BRANCH"
git checkout "$BRANCH"
git branch --set-upstream-to=origin/"$BRANCH" "$BRANCH"
git pull
git reset --hard origin/"$BRANCH"