3 ms·
I won’t lie, I keep using commits as the equivalent to saving, and hence have many commits on my GitHub Profile (2,000 in the last year - many for me, I guess s
by abhinav22 5y ago
I won’t lie, I keep using commits as the equivalent to saving, and hence have many commits on my GitHub Profile (2,000 in the last year - many for me, I guess some have much more).
At some point I got addicted to the number, so from time to time I try to manually increase my frequency of commits.
All that said, I end up doing more commits when working on front end stuff, when I doing back end programming, I am not at all interested in saving / committing frequently as I’m focused on the task at hand. With front end stuff, you necessarily need to save and refresh the webpage in your development browser, so it goes hand in hand with increasing my commits :-)
- piva00 5y agoDo you use `git stash`? I don't understand your workflow, do you commit to keep a log of your whole line of thought? As in: with your mistakes or failed designs/approaches being backtracked (overwritten/removed, etc.) and keeping an immutable sequence of your line of reasoning? For me, commits of work in progress are only done on my development branches before I want to push to a remote to save my work in case of my computer failing (or getting lost/stolen, whatever force majeure), I usually write a "WIP: <what's been worked on>" message that I will squash later on when I have a meaningful commit.
- zatarc 5y agoJust use (feature-)branches. You can commit every single character if you in the mood. At the end, when your new feature is complete, you just squash all commits in this branch to one single commit ("add feature xyz") and merge/rebase it to your main dev branch. Now it is really easy to identify the actual code behind a new feature.