Hacker News new | ask | show | jobs
by deathanatos 2637 days ago
> Have a commit command line that lists only the three files in question. It's really not that hard.

And how would you stage & commit only a portion of the changes made to a file?

(Like the parents, I use the staging area daily, and I am quite thankful for its existence.)

1 comments

> And how would you stage & commit only a portion of the changes made to a file?

I wouldn't. That code is untested, and I have a thing against committing untested code.

Git stash -p, on the other hand, allows me to select what code should be left in the working directory for testing, with no need for a staging area.

We just assume that when we commit, the code has been tested in the local dev environment. Better not be committing untested code to my repos, that will get you reprimanded.