Hacker News new | ask | show | jobs
by ori_b 2637 days ago
> 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.

1 comments

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.