Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • 8
    "moves"? This would indicate it has gone from the working directory. That's not the case. Commented Jun 8, 2017 at 9:18
  • Actually, git stage is the alias for git add, which is the historic command, both on Git and other SCM. It has been added in december 2008 with commit 11920d28da in the "Git's git repository", if I can say.
    – Obsidian
    Commented Sep 12, 2018 at 18:13
  • 3
    I agree, it's very annoying that Linus Torvalds, instead of creating simmetric commands, just created a new word for a different command. For simmetric i mean something like: commit - uncommit; stage-unstage . Or a keyword UNDO that can be used for many commands: git commit X - git UNDO commit x. Seems natural that one has to learn by heart a lot of words. The ones that are used not so often are easily forgotten... and here we all are on this page
    – fresko
    Commented Dec 21, 2021 at 10:27
  • @fresko There's also the mess about calling the same thing as cache, index or staging area but these things cannot be changed without breaking backwards compatibility. And similar to Linux kernel, Torvalds seems to prefer to keep any old partially-insane APIs as-is instead of ever breaking any old workflow. Nowadays we also have git restore --staged path/fo/file for this purpose. Commented Mar 20, 2023 at 14:36
  • If Git were designed today with the knowledge we now have, we would probably have stage and unstage only to modify the cache/index/staging area which would be called "staging area" in all documentation and user interface. Commented Mar 20, 2023 at 14:39