|
|
|
|
|
by tsm
3588 days ago
|
|
I had a recent epiphany about staging, which is that it really starts making sense if you stage as you go. Let's say you want to write small feature X, and it truly makes sense for X to be a single commit. But doing X involves changing around both Y and Z. Git makes the following workflow easy: * Fiddle around until you get Y working how you want it * Stage it * Fiddle around trying to get Z to work. Try something experimental. Nope, that's not you want it. `git checkout .` Try again. You don't have to worry about only blasting away the failed Z attempt while preserving Y—since Y is staged, it's easy to keep around. |
|