Discussing Code Commit in Projects

Discussing Code Commit in Projects

Daily short news for you
  • For over a week now, I haven't posted anything, not because I have nothing to write about, but because I'm looking for ways to distribute more valuable content in this rapidly exploding AI era.

    As I shared earlier this year, the number of visitors to my blog is gradually declining. When I looked at the statistics, the number of users in the first six months of 2025 has dropped by 30% compared to the same period last year, and by 15% compared to the last six months of 2024. This indicates a reality that users are gradually leaving. What is the reason for this?

    I think the biggest reason is that user habits have changed. They primarily discover the blog through search engines, with Google being the largest. Almost half of the users return to the blog without going through the search step. This is a positive signal, but it's still not enough to increase the number of new users. Not to mention that now, Google has launched the AI Search Labs feature, which means AI displays summarized content when users search, further reducing the likelihood of users accessing the website. Interestingly, when Search Labs was introduced, English articles have taken over the rankings for the most accessed content.

    My articles are usually very long, sometimes reaching up to 2000 words. Writing such an article takes a lot of time. It's normal for many articles to go unread. I know and accept this because not everyone encounters the issues being discussed. For me, writing is a way to cultivate patience and thoughtfulness. Being able to help someone through my writing is a wonderful thing.

    Therefore, I am thinking of focusing on shorter and medium-length content to be able to write more. Long content will only be used when I want to write in detail or delve deeply into a particular topic. So, I am looking for ways to redesign the blog. Everyone, please stay tuned! 😄

    » Read more
  • CloudFlare has introduced the pay per crawl feature to charge for each time AI "crawls" data from your website. What does that mean 🤔?

    The purpose of SEO is to help search engines see the website. When users search for relevant content, your website appears in the search results. This is almost a win-win situation where Google helps more people discover your site, and in return, Google gets more users.

    Now, the game with AI Agents is different. AI Agents have to actively seek out information sources and conveniently "crawl" your data, then mix it up or do something with it that we can't even know. So this is almost a game that benefits only one side 🤔!?

    CloudFlare's move is to make AI Agents pay for each time they retrieve data from your website. If they don’t pay, then I won’t let them read my data. Something like that. Let’s wait a bit longer and see 🤓.

    » Read more
  • Continuing to update on the lawsuit between the Deno group and Oracle over the name JavaScript: It seems that Deno is at a disadvantage as the court has dismissed the Deno group's complaint. However, in August, they (Oracle) must be held accountable for each reason, acknowledging or denying the allegations presented by the Deno group in the lawsuit.

    JavaScript™ Trademark Update

    » Read more

Issues

Every day, we constantly code and fix bugs along with other team members. Suddenly, one fine day, the tester screams about an error that you had fixed weeks ago. You immediately speak up, stating that you had already fixed it and you need to prove it to the tester. You open the commit history and boom... commit, fix bug, fix some bug... are the things that hit your eyes. And guess what? Those are the commit messages you made!

Now, how do you find that specific commit? You torture yourself wondering why you didn't commit more clearly at that time. Don't worry, everyone makes mistakes, and mistakes are meant to be fixed. But what's more important is that you have to recognize that you made a mistake and share your method of improvement!

Commit Clearly

That's right, first and foremost, try to come up with clear messages that are action-oriented towards the target.

For example:

  • Fix the issue of missing names in the list of provinces/cities
  • Add the feature to update provinces/cities
  • Add the Reference Documentation section to README.MD

I'm using Vietnamese as an example, but depending on the project's rules, you can also commit in English, but the essence and content should remain the same.

Add prefixes to messages

This is a method that many developers have applied in various projects on the social network platform Github. By using prefixes to categorize your common commit types in the project, you can easily differentiate and search for them.

In general, there will be some prefixes that developers self-agree upon, but it's not necessary to follow them.

Some commonly used prefixes are:

  • feat: add a new feature
  • fix: fix a bug
  • refactor: optimize an existing feature
  • style: changes that do not affect the meaning of the previous code, often related to the code formatting such as missing semicolons (;), removing spaces...

There are many other prefixes as well, which you can refer to in this article How to Write Better Git Commit Messages – A Step-By-Step Guide.

For example:

  • fix: Fix the issue of missing names in the list of provinces/cities
  • feat: Add the feature to update provinces/cities
  • docs: Add the Reference Documentation section to README.MD

Try to separate the meaning of each commit

I understand that many of you (including me) often encounter situations where while working on one feature or fixing a specific bug, we suddenly discover another issue and fix it conveniently. Then, when it comes to commit, we only write a generic message like "fix some bugs". This may be convenient, but it complicates tracking. Therefore, try to fix them one by one in a clear manner. Don't be afraid of using multiple commits and commit clearly.

Apply Git Flow

Git flow is a term that refers to the "conventions" followed by a team in a project. For example, a project might have 3 branches: master to store the latest code, release to determine the production-ready features, and develop to develop features for release.

In addition, Git Flow also defines the branching and merging flow while developing features. There is a well-known Git Flow called Git-Flow Cheatsheet which developers can refer to.

Lastly, use GUI tools for management

If you are comfortable with the command-line interface, that's okay. But personally, there have been many times when I had to use tools for managing Git. I find it convenient and it helps me keep track of the project's flow.

Nowadays, almost all code editors integrate or have plugins that allow easy and convenient Git management. Developers can explore further based on the specific tools they are using.

In conclusion

The above sharing is based on my experience, and it is up to the developers to apply them depending on their team's work and project flow. If you find them not suitable or have better suggestions, please leave a comment and let me and others know!

Premium
Hello

The secret stack of Blog

As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!

As a developer, are you curious about the technology secrets or the technical debts of this blog? All secrets will be revealed in the article below. What are you waiting for, click now!

View all

Subscribe to receive new article notifications

or
* The summary newsletter is sent every 1-2 weeks, cancel anytime.

Comments (2)

Leave a comment...
Avatar
Trần Cường3 years ago

Thực sự mình không để ý đến cái này, mình chỉ commit theo lý do tại sao

Reply
Avatar
Linh Trần3 years ago

Giờ mình mới biết có commit theo

Reply