Comment on git good

  1. I am legitimately unsure why that flag is called --cached. No other part of Git that I can think of uses that terminology, although admittedly I can't think of any good alternatives. Maybe --staging or --index?

    Comment Actions
    1. you've in fact just stumbled into a git trap: the fact that --cached and --index do different things in some commands; see also the excellently named "NOTES ON FREQUENTLY CONFUSED OPTIONS" part of the main gitcli manpage.

      Comment Actions
      1. Ha! Learned something new, thanks! All right, so it sounds like --staged is what the flag ought to be called.

        Comment Actions
        1. --staged and --cached are synonyms sometimes, as it says in the documentation for git diff. You would think they'd make it universal though and it's clearly not the case for git rm.

          Last Edited Thu 30 May 2024 03:03AM UTC

          Comment Actions