Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> these folks have trouble with even basic questions, like, "is this the change you intended to make on this branch?" when shown a diff.

I've seen people like this too, when reviewing PRs, I often see unwanted code being committed, and I just don't understand why this keeps happening. One of my defaults when committing code is to run "git status", then run "git diff" on each file I'm committing. I thought this was a pretty well used flow, but apparently it's not.



Or better yet: `git add -p`

If you only ever use `git add -N .` and `git add -p` you'll never have unexpected changes in your commit.


Or better yet: `git add -e`.


I tell people to run git log -p --reverse origin/master.. and git diff origin/master.. to see what changes their commits are introducing and the overall change they're making before they actually push the branch up to the remote. It's essentially proofreading what you're going to submit before actually submitting it.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: