DEV Community


Discussion on: Autocommitting

1e4_ profile image

This could end pretty badly. You shouldn't ever do this as your commits would end up being so random. Instead you should get in thr habit of commiting more often.

It doesn't matter when you commit. It matters what you commit. If you have 20 files on awaiting to be commited, take a second and instead of git add . commit files in groups relevant to what they are. Fix Bug A. Added new feature in user profiles. Fix an issue with styling on edge and safari.. etc.

Commiting the right things is way more important than commiting all the time. Also make your commit message mean something. Nothing worse than looking through a git repo and not being able to see what's changed just off the messages.

If you use github desktop it should probably be open most of the time just chilling in the background. If you use an IDE such as PHPStorm or WebStorm it has Git integrated into it.

Just please don't get in the habit of relying on an automated tool to commit.

donnaken15 profile image
Wesley Author

yeah, i get all that, but with my workflow, i add everything anyways, and if theres things i dont want to add in there yet or something, i move it out of the folder, or comment it out if i think its problematic. i still kind of made this out of habit of not committing more often (i blatantly google searched once if i should just for one sentence of advice), if even making code changes as often, because i could be making 20 lines one day and not commit that, and then on another day (say 2 weeks apart), make 40 lines and finally put that out. i'm also not very into the mindset of titling all my commits to tell what they change (a third of the time, i do though), so the random summarizer idea didn't bother me. i can also sort of get how i mentioned the frequency of putting out changes would be excessive, maybe activating the script weekly or biweekly is better in that case. maybe i could make my script focus in on comments that would be important for summarizing titles. i also close GHD unwantingly a few times, so

Forem Open with the Forem app