It's definitely tedious and often annoying to pause working on a project so frequently to commit to your git repo. However, it is such a fantastic benefit if you do it well.
I've learned that coding projects can so easily become larger than what you had initially expected. They can also change direction midway through the development phase. If you barely know the direction of project in the present, trust me, it will be near impossible to re-learn it in the future.
That's where the beauty of frequent git commits come in.
Of course git is first-and-foremost a version control system, but it is also a fantastic story teller. By having frequent and descriptive commits, you have a much better chance of following along with the train of thought you had at that moment of development.
This mechanism of storytelling has three great purposes:
Maybe you want to revisit a project and continue developing it. By reading the few most recent commits, you can put yourself back in that state-of-mind and progress onward with little difficulty.
Maybe somebody wants to offer an added feature to one of your existing open-source projects. By reading the README.md and following along with your commit messages, that somebody can better understand how the project was built.
Maybe you are applying for a job and the recruiter wants you to explain code from one of your projects. It'd be wonderful to go back in time and see what message you logged at the time of adding that code. Fortunately, the git file offers that pleasure, but only if you've committed your edits descriptively and frequently. It will show to the recruiter that you are highly organized with your logging of changes and know how to get quickly familiar with a project.
I am still working on my efforts to commit more often to git, but I absolutely see the benefits in the tool and know that it's worth the short and temporary hassle.
Top comments (0)