3 ms·
Two things: To review the changes piece by piece before commit (git add -p) in case there's something temporary in there I forgot, and to easily exclude any su
by Izkata 3y ago
Two things: To review the changes piece by piece before commit (git add -p) in case there's something temporary in there I forgot, and to easily exclude any such thing I never intended to commit (usually todo-style comments, sometimes hardcoding a value to trigger a bug or a popup, etc)
I remember a decade ago trying mercurial and git at the same time when subversion was all I knew, and that there was something about mercurial that I found really confusing. It's long enough ago I don't remember what it was, and it may be better now, but git clicked immediately. I wouldn't be surprised if it was the way they handle commits instead of having a staging area.
Also compared to subversion, the staging area is an explicit form of something that half-exists in how it tracks files for committing.
- forrestthewoods 3y agoInteresting. I use Mercurial in my day job and use Araxis Merge. Before pushing to CI I use Araxis to diff every file. Can make changes to the file in the tool if needed. Often reverting temp changes or spurious whitespace. This generates new changes which I then amend.