https://github.com/ph-7/outstandinggitpractices
OutstandingGitPractices™ contains a list of best practices to follow when using git. If you would like to become an outstanding dev, well, this is your guideline!
https://github.com/ph-7/outstandinggitpractices
clean clean-code commit-code communication git gitcommit github good-practices
Last synced: about 2 months ago
JSON representation
OutstandingGitPractices™ contains a list of best practices to follow when using git. If you would like to become an outstanding dev, well, this is your guideline!
- Host: GitHub
- URL: https://github.com/ph-7/outstandinggitpractices
- Owner: pH-7
- Created: 2022-04-03T23:09:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T02:32:46.000Z (over 1 year ago)
- Last Synced: 2025-02-02T12:30:46.408Z (11 months ago)
- Topics: clean, clean-code, commit-code, communication, git, gitcommit, github, good-practices
- Homepage: https://dev.to/pierre/guideline-git-commit-2blb
- Size: 315 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Outstanding Git Practices
### The 2 Most Important Guidelines When Committing Your Code
- [Commit Messages](#commit-messages-)
- [Git Commits](#git-commits-)
- [About the Author](#about-the-author-)
## Commit Messages 📝
Commit messages play a big role in the understanding of every change. They should be in present tense, short, clear and explicit.
They should clearly say **what happened** as well as the **reason**/**motivation** behind the change.
Ask yourself, “*What are the changes done for?*” In other words, *“Why did you do what you did?”* - In short, it is the explanation that we don't necessarily see in the code diff of the commit.
Additionally, add the ticket ID at the beginning of your commit message. Sometimes, we need to know the reason why a piece of code has been changed and need to dig into the ticket to have a full understanding of the context of the feature requirements.
---
## Git Commits 🎨
✅ Each commit should be small and fix only one thing per commit, not more. Following this important rule, if your commit message contains the word `and` or `+` sign, that means you are trying to commit multiple changes in one commit and you shouldn't ❌
This rule is not just there to be nice. When you need to `git revert` or `cherry-pick` a commit from your git history, the fact that one commit only contains one specific update really helps.
## 🎥 [Why you shouldn't use AI auto-generated commit messages?](https://youtu.be/V-QH6St6Ki8)
👉 [Click here to watch on YouTube](https://youtu.be/V-QH6St6Ki8)
## About the Author 👨🍳
**[Pierre-Henry Soria](https://ph7.me)**. A super passionate and enthusiastic software engineer, and a true cheese & chocolate lover 💫
[](https://x.com/phenrysay "Follow me on X") [](https://github.com/pH-7 "Follow me on GitHub") [](https://www.youtube.com/@pH7Programming "Subscribe to my YouTube Tech Channel")
[](https://ph7.me "Pierre-Henry Soria personal website")