From 3bf256f6cbf547832c5d938d62a962c80ea865ed Mon Sep 17 00:00:00 2001 From: Mike Rogne Date: Sat, 27 Oct 2018 18:52:23 -0500 Subject: [PATCH] git checkout: add example for creating new branch based on remote branch with different name (#2494) --- pages/common/git-checkout.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pages/common/git-checkout.md b/pages/common/git-checkout.md index 1cbcd946d..d546e746e 100644 --- a/pages/common/git-checkout.md +++ b/pages/common/git-checkout.md @@ -6,6 +6,10 @@ `git checkout -b {{branch_name}}` +- Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references): + +`git checkout -b {{branch_name}} {{reference}}` + - Switch to an existing local branch: `git checkout {{branch_name}}`