Add fetch into Git "up" function

In [a previous commit], we removed the fetching of the "origin" remote
from the "up" Git function. With this change, developers had to fetch
manually before rebasing their branch. We added the fetch back into the
"up" Git function.

[a previous commit]: f252ba46d1 (diff-b973d5fb5d66981ace5c069881095355)
This commit is contained in:
Rob Whittaker 2020-06-18 14:50:10 +01:00
parent f07398b032
commit d499cc56db
No known key found for this signature in database
GPG key ID: FC30C01F4D49E128

View file

@ -2,6 +2,8 @@
set -e
git fetch origin
if git symbolic-ref --short refs/remotes/origin/HEAD >/dev/null; then
git rebase "$(git symbolic-ref --short refs/remotes/origin/HEAD | sed 's@^origin/@@')" "$@"
else