From fa0002479b6487a0fc68c9caf391692c6b17100a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 30 Nov 2017 14:42:10 -0200 Subject: Fetch first at git-update-superproject git-checkout-branch --- git-checkout-branch | 3 +++ 1 file changed, 3 insertions(+) (limited to 'git-checkout-branch') 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 -- cgit v1.2.3