From: Scott Chacon Date: Tue, 2 Dec 2008 06:14:55 +0000 (-0800) Subject: Add a built-in alias for 'stage' to the 'add' command X-Git-Tag: v1.6.1-rc2~24 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=11920d28da1ac1b65eb4041c1b7355924e5d1366;p=git.git Add a built-in alias for 'stage' to the 'add' command This comes from conversation at the GitTogether where we thought it would be helpful to be able to teach people to 'stage' files because it tends to cause confusion when told that they have to keep 'add'ing them. This continues the movement to start referring to the index as a staging area (eg: the --staged alias to 'git diff'). Also adds a doc file for 'git stage' that basically points to the docs for 'git add'. Signed-off-by: Scott Chacon Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-stage.txt b/Documentation/git-stage.txt new file mode 100644 index 000000000..7f251a586 --- /dev/null +++ b/Documentation/git-stage.txt @@ -0,0 +1,19 @@ +git-stage(1) +============== + +NAME +---- +git-stage - Add file contents to the staging area + + +SYNOPSIS +-------- +[verse] +'git stage' args... + + +DESCRIPTION +----------- + +This is a synonym for linkgit:git-add[1]. Please refer to the +documentation of that command. diff --git a/git.c b/git.c index 89feb0b6d..9e5813cc9 100644 --- a/git.c +++ b/git.c @@ -266,6 +266,7 @@ static void handle_internal_command(int argc, const char **argv) const char *cmd = argv[0]; static struct cmd_struct commands[] = { { "add", cmd_add, RUN_SETUP | NEED_WORK_TREE }, + { "stage", cmd_add, RUN_SETUP | NEED_WORK_TREE }, { "annotate", cmd_annotate, RUN_SETUP }, { "apply", cmd_apply }, { "archive", cmd_archive },