Skip to main content

Label Your AI vs Human Code in Commit

Published 1 min readMarkdown
Part of seriesA little thing
Label Your AI vs Human Code in Commit

Quick Tip for Better Team Collaboration

Since many teams already have their git commit practices, here’s a simple addition that makes a big difference:

AI-Generated Code:

Thore are good examples from my https://github.com/jellydn/moleculer-typescript-template/

In short, we should keep this as a convention for git.

feat: implement user authentication

[AI-Generated | Human Supervised]

Human-Written Code:

Here is the some example from my https://github.com/jellydn/tiny-nvim

feat: implement user authentication

[Engineer-Written]

Why Do This?

  • Reviewers know what they’re looking at instantly

  • Team learns from both AI and human approaches

  • Builds trust in AI tools through transparency

  • Creates clear accountability

Bonus Tip: Clean Up AI Comments

AI tools often generate redundant or overly verbose comments. Clean them up:

Remove:

// This function calculates the sum of two numbers
function add(a, b) {
    return a + b; // Returns the sum of a and b
}

Keep:

function add(a, b) {
    return a + b;
}

Only keep comments that explain why, not what.

Just Add It

If you’re already updating your commit standards, consider adding this. It takes 5 seconds per commit and saves everyone time during reviews.

Your team will appreciate the clarity.

About the author

  • Hi 👋, I'm Dung Huynh Duc A passionate engineer from Singapore

    🔭 I’m currently working in AirCarbon

    👨‍💻 All of my projects are available at https://productsway.com

    📝 I regularly write articles on https://productsway.com

    📫 How to reach me dung@productsway.com

    📹 I often publish my video every Sunday on IT Man Channel

No comments yet. Be the first to comment.