Skip to content

Commit

Permalink
Add a built-in alias for 'stage' to the 'add' command
Browse files Browse the repository at this point in the history
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 <schacon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Scott Chacon authored and Junio C Hamano committed Dec 3, 2008
1 parent d404bf0 commit 11920d2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Documentation/git-stage.txt
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions git.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit 11920d2

Please sign in to comment.