Skip to content

checkout: introduce "--to-branch" option

ZheNing Hu via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2checkout: handling branch_info memory leakbuiltin/checkout.c+14 -21 reply
2/2checkout: introduce "--to-branch" optionDocumentation/git-checkout.txt builtin/checkout.c t/t2018-checkout-branch.sh +1 more+126 -112 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] checkout: introduce "--to-branch" option

Sometimes people expect to checkout to a commit (or a commit which tag reference to) and develop on its corresponding branch. This may take some steps:

$ git checkout v1.1
$ git log  # search for the branch dev1
$ git checkout dev1

collapse the above steps into one step:

$ git checkout --to-branch v1.1
Switched to branch 'refs/heads/dev1'

This will help users switch to the unqiue branch quickly.

Thanks.

ZheNing Hu (2):
checkout: handling branch_info memory leak
checkout: introduce "--to-branch" option

 Documentation/git-checkout.txt |  8 +++-
 builtin/checkout.c             | 49 +++++++++++++++++++-
 t/t2018-checkout-branch.sh     | 85 ++++++++++++++++++++++++++++++++++
 t/t9902-completion.sh          |  1 +
 4 files changed, 140 insertions(+), 3 deletions(-)

base-commit: abe6bb3905392d5eb6b01fa6e54d7e784e0522aa
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1095%2Fadlternative%2Fcheckout-w-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1095/adlternative/checkout-w-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1095

Signature · 1 line
gitgitgadget