Allow checkout -B <current-branch> to update the current branch
When on master, "git checkout -B master <commit>" is a more natural way to say "git reset --keep <commit>", which was originally invented for the exact purpose of moving to the named commit while keeping the local changes around. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3f59481e33
commit
39bd6f7261
3
branch.h
3
branch.h
@ -13,7 +13,8 @@
|
||||
* branch for (if any).
|
||||
*/
|
||||
void create_branch(const char *head, const char *name, const char *start_name,
|
||||
int force, int reflog, enum branch_track track);
|
||||
int force, int reflog,
|
||||
int clobber_head, enum branch_track track);
|
||||
|
||||
/*
|
||||
* Validates that the requested branch may be created, returning the
|
||||
|
Reference in New Issue
Block a user