You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
branch: move multiple branches in a single --force
Using either the 1-arg or 2-args form of --force
it is possible to only move one branch at a time,
to HEAD and <arg2> respectively.
Allow moving multiple branches to a single target by giving
'git branch --force b1 b2 b3 ... dest' cp-like semantics,
all the branches are moved/created to 'dest'.
The convention extends the 2-args form in the same way
'cp a b c ... dest' would do.
There could be another potential interpretation of
`--force a b c`: moving all 3 to HEAD, but the 2-args
form already changed the semantics to cp-like instead
of appending an implicit HEAD, so this seems the least
surprising way to support multiple moves.
No such change is done to the move/copy paths,
as such paths would error out anyway by trying
to create multiple branches of the same name.
Signed-off-by: Andrea Stacchiotti <[email protected]>
0 commit comments