4 ms·
The main thing I struggle with in git is the habit of “make a change, make a commit”. I will often do multiple commits but they will be all at once as I go thr
by hk1337 2y ago
The main thing I struggle with in git is the habit of “make a change, make a commit”.
I will often do multiple commits but they will be all at once as I go through and make a commit and include any relevant changes in the commit.
- rectang 2y agoI find that the command "git add -p", which allows you to add individual sections of files rather than whole files before committing, helps with this issue. It's quite natural to wind up with a bunch of work that really needs to be in multiple commits. I don't think this ever changes for most of us.
- hk1337 2y agoThat’s basically what I do, I just end up doing it in large spurts. I typically use the cli for most things but I like the GitHub app for picking out changes for a particular commit.