Philosophy of git:
- Make small logical changes.
- When it’s working, go through your changes, reading once more for what you could do better.
- Read all the diffs everytime, and selectively stage changes as you go.
Make small logical changes:
- Focused building
You’re only building exactly one feature at a time. Maximizing your ability. Baddeley’s model of working memory
When it’s working, go through your changes, reading once more for what you could do better.
- When you’ve gotten something working, hopefully you had to learn and strech the boundaries of what you know to achieve it. This usually means it’s not the best code you’ve written.
- Looking through the diffs, now that you’ve worked it out, lets you see the bigger picture and better abstractions that will help make this more maintainable.
Read all the diffs everytime, and selectively stage changes as you go.
- You will most likely find a bug.
Every time I’ve commited thinking, yep I absolutely know what’s in this, let’s just commit and move on, I add a bug, or leave in something that shouldn’t have been.
Here’s what can easily get left behind if you don’t read diffs and selectively stage.
Have suggestions for a topic I should cover? Send me a dm at @AniketSMK or email me at hello@[firstname][lastname].com