aboutsummaryrefslogtreecommitdiff
path: root/git-checkout-branch
diff options
context:
space:
mode:
Diffstat (limited to 'git-checkout-branch')
-rwxr-xr-xgit-checkout-branch3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-checkout-branch b/git-checkout-branch
index f9516d4..249ce93 100755
--- a/git-checkout-branch
+++ b/git-checkout-branch
@@ -26,6 +26,9 @@ BASENAME="`basename $0`"
# Checkout the branch containing a commit
function checkout_branch {
+ # Fetch from all repositories
+ git fetch --all
+
# Check if we are in a detached HEAD
if git branch | grep -q '* (HEAD detached'; then
# Determine the commit we're in