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

Re: a few beginner git questions

From
TAThomas Anderson <zelnaga@gmail.com>
Date
Mar 7, 2010, 02:23 UTC
Message-ID
<15b345f1003061823u2d7edeeo25229f0a32456f45@mail.gmail.com>
In-Reply-To
<20100306070533.GL2480@ece.pdx.edu>
On Sat, Mar 6, 2010 at 1:05 AM, Tait <git.git@t41t.com> wrote:
Show 9 quoted lines
>> 1. When do you commit changes and when do you stage changes?  Or maybe
>> more to the point, what's the difference between doing "stage, commit,
>> stage, commit" and "stage, stage, commit"?
>
> Staging changes is a prerequisite to committing them. With stage, commit,
> stage, commit you will have two commits in history. With stage, stage,
> commit you will have only one commit in history. What you stage (or
> neglect to stage) is not part of recorded history in the repository. What
> you commit, is.

What's the difference, then, between doing "stage, stage, commit" as opposed to "stage, commit"? Why not just make all commits stage automatically?

Previous: TaitNext: Dmitry Potapov
Message 4 of 9 in “a few beginner git questions”
  1. Thomas AndersonMar 6, 2010
  2. Allan WindMar 6, 2010
  3. TaitMar 6, 2010
  4. Thomas AndersonMar 7, 2010
  5. Dmitry PotapovMar 7, 2010
  6. Thomas AndersonMar 7, 2010
  7. Dmitry PotapovMar 7, 2010
  8. TaitMar 8, 2010
  9. Junio C HamanoMar 7, 2010

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.