From c3b925685cb63db14fc5463ed3711a0f339940b5 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Tue, 14 Sep 2021 16:27:11 -0700 Subject: [PATCH] add switch to master script old-commit-hash: 082bbc9d2733f125b7cea03f7be338eb9df6f353 --- scripts/switch_to_master.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/switch_to_master.sh diff --git a/scripts/switch_to_master.sh b/scripts/switch_to_master.sh new file mode 100755 index 0000000000..cad51eb549 --- /dev/null +++ b/scripts/switch_to_master.sh @@ -0,0 +1,16 @@ +#!/usr/bin/bash + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +cd $DIR/.. + +git clean -xdf . +git rm -r --cached . + +git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" +git fetch origin master +git checkout master +git reset --hard +git submodule update --init + +printf '\n\n' +echo "master checked out. reboot to start building openpilot master"