commit - 8cfb4057347c76581c64b02802d4b9608bf56fd2
commit + 97b3a7beacbda58876c185d6aa2b1b9c305fa6f6
blob - 5b0caca573471a7115a0ac8bba32b020c9db5557
blob + 73e5c0ffe45e0fc90db1a713e9c8f9075ab559cb
--- got/got.1
+++ got/got.1
.Ar path-prefix
will be checked out.
.El
+.It Cm co
+Short alias for
+.Cm checkout .
.It Cm update [ Fl b Ar branch ] [ Fl c Ar commit ] [ Ar path ]
Update an existing work tree to a different commit.
Show the status of each affected file, using the following status codes:
If this option is not specified, the most recent commit on the work tree's
branch will be used.
.El
+.It Cm up
+Short alias for
+.Cm update .
.It Cm status [ Ar path ]
Show the current modification status of files in a work tree,
using the following status codes:
If a
.Ar path
is specified, only show modifications within this path.
+.It Cm st
+Short alias for
+.Cm status .
.It Cm log [ Fl b ] [ Fl c Ar commit ] [ Fl C Ar number ] [ Fl l Ar N ] [ Fl p ] [ Fl r Ar repository-path ] [ path ]
Display history of a repository.
If a
.It Fl d Ar name
Delete the branch with the specified name from the repository.
.El
+.It Cm br
+Short alias for
+.Cm branch .
.It Cm add Ar file-path ...
Schedule unversioned files in a work tree for addition to the
repository in the next commit.
If a file was deleted with
.Cm got rm
it will be restored.
+.It Cm rv
+Short alias for
+.Cm revert .
.It Cm commit [ Fl m Ar message ] [ file-path ]
Create a new commit in the repository from local changes in a work tree
and use this commit as the new base commit for the work tree.
.Cm got commit
opens a temporary file in an editor where a log message can be written.
.El
+.It Cm ci
+Short alias for
+.Cm commit .
.It Cm cherrypick Ar commit
Merge changes from a single
.Ar commit
.Cm got update .
If the work tree already contains files with merge conflicts, these
conflicts must be resolved first.
+.It Cm ch
+Short alias for
+.Cm cherrypick .
.It Cm backout Ar commit
Reverse-merge changes from a single
.Ar commit
.Cm got update .
If the work tree already contains files with merge conflicts, these
conflicts must be resolved first.
+.It Cm bo
+Short alias for
+.Cm backout .
.El
.Sh ENVIRONMENT
.Bl -tag -width GOT_AUTHOR
blob - f51f008b5b3b03543c35038f7bde5d42c0a6a637
blob + e6a9bf7895318f3de7356a15f9b06c1234b7cbb8
--- got/got.c
+++ got/got.c
const char *cmd_name;
const struct got_error *(*cmd_main)(int, char *[]);
void (*cmd_usage)(void);
+ const char *cmd_alias;
};
__dead static void usage(void);
static const struct got_error* cmd_backout(int, char *[]);
static struct got_cmd got_commands[] = {
- { "init", cmd_init, usage_init },
- { "checkout", cmd_checkout, usage_checkout },
- { "update", cmd_update, usage_update },
- { "log", cmd_log, usage_log },
- { "diff", cmd_diff, usage_diff },
- { "blame", cmd_blame, usage_blame },
- { "tree", cmd_tree, usage_tree },
- { "status", cmd_status, usage_status },
- { "ref", cmd_ref, usage_ref },
- { "branch", cmd_branch, usage_branch },
- { "add", cmd_add, usage_add },
- { "rm", cmd_rm, usage_rm },
- { "revert", cmd_revert, usage_revert },
- { "commit", cmd_commit, usage_commit },
- { "cherrypick", cmd_cherrypick, usage_cherrypick },
- { "backout", cmd_backout, usage_backout },
+ { "init", cmd_init, usage_init, "" },
+ { "checkout", cmd_checkout, usage_checkout, "co" },
+ { "update", cmd_update, usage_update, "up" },
+ { "log", cmd_log, usage_log, "" },
+ { "diff", cmd_diff, usage_diff, "" },
+ { "blame", cmd_blame, usage_blame, "" },
+ { "tree", cmd_tree, usage_tree, "" },
+ { "status", cmd_status, usage_status, "st" },
+ { "ref", cmd_ref, usage_ref, "" },
+ { "branch", cmd_branch, usage_branch, "br" },
+ { "add", cmd_add, usage_add, "" },
+ { "rm", cmd_rm, usage_rm, "" },
+ { "revert", cmd_revert, usage_revert, "rv" },
+ { "commit", cmd_commit, usage_commit, "ci" },
+ { "cherrypick", cmd_cherrypick, usage_cherrypick, "ch" },
+ { "backout", cmd_backout, usage_backout, "bo" },
};
int
cmd = &got_commands[i];
- if (strncmp(cmd->cmd_name, argv[0], strlen(argv[0])))
+ if (strcmp(cmd->cmd_name, argv[0]) != 0 &&
+ strcmp(cmd->cmd_alias, argv[0]) != 0)
continue;
if (hflag)