myhome/.local/bin/gswitch

8 lines
177 B
Plaintext
Raw Normal View History

2023-03-02 11:03:59 +01:00
#!/bin/bash
BRANCH=$1
git checkout -b "$BRANCH"
git checkout "$BRANCH"
git branch --set-upstream-to=origin/"$BRANCH" "$BRANCH"
git pull
git push --set-upstream origin "$BRANCH"