update-reset: Use the default branch origin/HEAD

Use the default branch of the repo, origin/HEAD.
This commit is contained in:
Shaun Jackman 2020-06-17 17:26:15 -07:00
parent aeafbd1c8f
commit b4fc3ead1e

View File

@ -42,7 +42,9 @@ homebrew-update-reset() {
echo
ohai "Resetting $DIR..."
git checkout --force -B master origin/master
head="$(git symbolic-ref refs/remotes/origin/HEAD)"
head="${head#refs/remotes/origin/}"
git checkout --force -B "$head" origin/HEAD
echo
done
}