Git
Best Practice
Type of commit
bash
feat: The new feature being added to a particular application
fix: A bug fix (this correlates with PATCH in SemVer)
style: Feature and updates related to styling
refactor: Refactoring a specific section of the codebase
test: Everything related to testing
docs: Everything related to documentation
chore: Regular code maintenance
- Use Clear and Concise Commit Messages
- A great commit message should be less than 10 words.
Gitflow
Any code in the main branch should be deployable. Create new descriptively-named branches off the main branch for new work, such as feature/add-new-payment-types. Commit new work to your local branches and regularly push work to the remote. To request feedback or help, or when you think your work is ready to merge into the main branch, open a pull request. After your work or feature has been reviewed and approved, it can be merged into the main branch. Once your work has been merged into the main branch, it should be deployed immediately.
Git Tools
- GitButler:Mac 上的 Git 可视化工具,Tw93 推荐。
- Sourcetree:Git 的 Windows 可视化工具
- Gitflow: Git extensions to provide high-level repository operations for Vincent Driessen's branching model.