Git Most Wildly Accepted Bad Pattern
One common misconception when working with Git is that you need to run git add ., commit, and push after every single atomic change.
Linas Kapoฤius
Solutions Architect at Corgineering.com
๐ ๐๐ซ๐ฎ๐ญ๐ก ๐ข๐ฌ, ๐ฒ๐จ๐ฎ ๐๐จ๐งโ๐ญ ๐ก๐๐ฏ๐ ๐ญ๐จ.
It's much better to commit frequently as you complete meaningful chunks of work, but you donโt always need to push right away. Instead, try pushing after short breaksโsay every 1-2 hoursโwhen you have a logical batch of changes ready to go.
๐ ๐๐จ๐ฆ๐ฆ๐ข๐ญ ๐๐๐ฌ๐ฌ๐๐ ๐๐ฌ ๐๐๐ญ๐ญ๐๐ซ
Letโs be honest, I've found myself using generic commit messages like "added some changes" which is vague and repetitive. To make your commits more useful, focus on ๐ฐ๐ก๐๐ญ you changed and ๐ฐ๐ก๐ฒ.
If that sounds tricky, donโt worryโthat's where ๐๐จ๐ง๐ฏ๐๐ง๐ญ๐ข๐จ๐ง๐๐ฅ ๐๐จ๐ฆ๐ฆ๐ข๐ญ๐ฌ come in! With a simple extension for VS Code, you can standardize your commit messages to look cleaner and more professional. Examples:
feat: add user login functionality fix: resolve issue with payment gateway refactor: optimize database queries
If you found this helpful or my own created meme funny, donโt forget to like and follow us on social media for more tips on improving your development workflow! ๐ฌ
This article is part of our Best Practices series. Check out our other articles.