Thread (4 messages) flat view 4 messages, 1 author, 2016-06-15
DORMANTno replies

[PATCH 0/3] DWIM with "git checkout -f -b"

From: Tay Ray Chuan <hidden>
Date: 2016-06-15 22:48:59

Right now, the -f/--force in git-checkout doesn't carry over to -b
operations - ie. you can't do git checkout -b branch on an existing
branch. This patch series changes this, so that one can do

  git checkout -f -b branch ref

which is equivalent to

  git branch -f branch ref && git checkout branch

Contents:
[PATCH 1/3] add tests for checkout -b
[PATCH 2/3] t2018-checkout-branch.sh: show that checkout -f -b doesn't DWIM
[PATCH 3/3] builtin/checkout: DWIM with -f -b

 Documentation/git-checkout.txt |    3 +
 builtin/checkout.c             |    4 +-
 t/t2018-checkout-branch.sh     |   86 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 91 insertions(+), 2 deletions(-)
 create mode 100755 t/t2018-checkout-branch.sh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help