git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] added a built-in alias for 'stage' to the 'add' command

From
Jeff King <peff@peff.net>
Date
Dec 1, 2008, 18:25 UTC
Message-ID
<20081201182557.GA24443@coredump.intra.peff.net>
In-Reply-To
<20081201172902.GA41963@agadorsparticus>
On Mon, Dec 01, 2008 at 09:29:02AM -0800, Scott Chacon wrote:
Show 8 quoted lines
> 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 added a
> doc file for 'git stage' that basically points to the docs for
> 'git add'.

FWIW, I think this is a step in the right direction. Or at least if it's the wrong direction, I don't think we're actually _hurting_ anybody, since we're not changing existing commands.

Out of curiosity, have you had any experiences referring to this as "git stage" (maybe just by setting a per-user alias) with new users?

Show 6 quoted lines
> +SYNOPSIS
> +--------
> +[verse]
> +'git stage' [-n] [-v] [--force | -f] [--interactive | -i] [--patch | -p]
> +	  [--all | [--update | -u]] [--intent-to-add | -N]
> +	  [--refresh] [--ignore-errors] [--] <filepattern>...

It seems like this might get stale with respect to git-add(1). Since we're not hiding the fact that this is really an alias for "add", maybe it would be better to just have "git stage [options] [--] <filepattern>" (or maybe even something simpler).

-Peff
Previous: Scott ChaconNext: Junio C Hamano
Message 2 of 3 in “added a built-in alias for 'stage' to the 'add' command”
  1. added a built-in alias for 'stage' to the 'add' commandScott Chacon, Dec 1, 2008
  2. Jeff KingDec 1, 2008
  3. Junio C HamanoDec 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.