Git-ing There
Issue #20 — Check out some Git advice
Welcome to the 20th edition of Coffee Bytes, a daily digest by Better Programming.
GitHub recently announced that it’ll require all users who contribute code on GitHub.com to enable 2FA by the end of 2023. Check out the complete announcement on their official blog.
In this issue, we’ve collected a few detailed git guides and pieces of advice to help you git-started right away.
- Your Git Commit History Should Read Like a History Book. Here’s How. — by Mirco. Mirco’s first piece with Better Programming shares a way to enforce conventional commit messages through git hooks in order to make your commit history readable. The story has got a lot of reactions from the Reddit community. Check it out and tell us what you think.
- Why Storing Secrets and Passwords in Git Is a Bad Idea — by Alessandro Segala. Storing secrets together with the source code might not be the best way to go. Alessandro’s piece revolves around adopting better techniques. I like the idea of using a key vault.
- Safely Keep Your Application Secrets in Repos Even if They’re Public Using Git-Crypt — by Michael Bogan. If you’d still want to keep your app’s secrets with public repos, Michael shares a great technique by adopting
git-crypt
. - Automate Manual Commit Tasks With Git Hooks — by Kirshi Yin. Another helpful list of powerful Git hooks to automate day-to-day commit tasks.
git-confirm
was new for me. - Write Better Git Commit Messages To Increase Your Productivity — by Paul Knulst. It’s always the little changes that make a big difference. Paul’s guide discusses a few ways to structure your commit messages to boost your team’s productivity.
- Github Templates: The Smarter Way to Formalize Pull Requests Among Development Teams — by Paige Niedringhaus. Paige’s presents Github’s
pull_request_templates
, a way to manage your team’s pull requests in an orderly fashion. - Leave Aside Git Checkout. Consider Git Switch for a Change — by Dmytro Khmelenko. git checkout is the de-facto way to navigate between branches. But do you know git switch is a good alternative? Dmytro feels understanding
switch
is easier to someone who’s completely new to Git. - Why and How You Should Sign All Your Git Commits — by Richard Nagy. You might not always need to sign every Git commit. However, when if you’re managing repositories where anyone can contribute, you may want to check Richard’s guide.