4 ms·
> One nice example: What is "staging" in Git? Hell, I've used Git for years now, and that part of my mental model is _still_ fuzzy, but the model is good enough
by robertlagrant 4y ago
> One nice example: What is "staging" in Git? Hell, I've used Git for years now, and that part of my mental model is _still_ fuzzy, but the model is good enough to do my job well. I cannot know everything crystal clear.
You may have heard this one before, but staging is just saying, on your local filesystem, of all the files I've changed in this repo since last commit, these are the files I want to add into my next commit. You mark them for this with `git add <filename`.
(Slightly more detail: it doesn't need to be file-level; you can stage only certain changes within files if you like, using `git add -p <filename>`.)