Skip to content

Commit be427d7

Browse files
sitaramcgitster
authored andcommitted
allow -t abbreviation for --track in git branch
also makes it consistent with git-checkout Signed-off-by: Junio C Hamano <[email protected]>
1 parent 74fd872 commit be427d7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Documentation/git-branch.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ OPTIONS
111111
--no-abbrev::
112112
Display the full sha1s in the output listing rather than abbreviating them.
113113

114+
-t::
114115
--track::
115116
When creating a new branch, set up configuration to mark the
116117
start-point branch as "upstream" from the new branch. This

builtin-branch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ int cmd_branch(int argc, const char **argv, const char *prefix)
547547
struct option options[] = {
548548
OPT_GROUP("Generic options"),
549549
OPT__VERBOSE(&verbose),
550-
OPT_SET_INT( 0 , "track", &track, "set up tracking mode (see git-pull(1))",
550+
OPT_SET_INT('t', "track", &track, "set up tracking mode (see git-pull(1))",
551551
BRANCH_TRACK_EXPLICIT),
552552
OPT_BOOLEAN( 0 , "color", &branch_use_color, "use colored output"),
553553
OPT_SET_INT('r', NULL, &kinds, "act on remote-tracking branches",

0 commit comments

Comments
 (0)