Yeah, that’s spot on, @emma-crepeau. I’ve run into this a lot working on teams where new files get staged accidentally. In my workflow, when I git unstage file because I just don’t want to commit it yet, git reset HEAD <file> is the easiest fix, it’s like saying “just chill, not yet.
But git rm --cached <file> adds another layer. It’s not just unstaging — it’s also saying, “Hey Git, forget this file even exists in the repo.” This really helps when someone adds an environment config or a log file that shouldn’t be versioned. It unstages and untracks, but doesn’t touch the actual file on your machine — which is key if it’s still needed locally.