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

My mental model of a git repo is basically a stack of backup tapes with sticky notes on them that say “this is tape #2983 and it's almost the same as tape #2429, except that I fixed a typo.” Things like `git log` and common workflows make you think “this is change #2983, where I fixed a typo”, and that's where the trouble starts.


It's an organizational and personal thing, but you really have to get in the habit of treating commits as single diffs to the codebase and not the equivalent of ctrl + s in your editor.

I try and make a habit of squashing my commits so that git log is a narrative of development and each commit is a page number, not a sticky note.




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

Search: