Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Guidelines πŸˆβ€β¬› #51

Closed
danielcdz opened this issue Dec 6, 2024 · 0 comments
Closed

Git Guidelines πŸˆβ€β¬› #51

danielcdz opened this issue Dec 6, 2024 · 0 comments

Comments

@danielcdz
Copy link
Member

danielcdz commented Dec 6, 2024

πŸ› οΈ Git Best Practices and Guidelines

Effective use of Git ensures clean, organized repositories and simplifies collaboration. Follow these guidelines to maintain high-quality version control.


1. 🌿 Branching Strategy

  • Always create a new branch for your changes. Avoid working directly on the main or master branch.
  • Use descriptive names for branches:
    • Feature: feature/add-login
    • Bugfix: bugfix/fix-signup-error
    • Hotfix: hotfix/critical-issue

2. πŸ” Commit Messages

  • Write clear, concise commit messages.
  • Follow the format:
<type>: <short summary>

<optional detailed description>

Examples:

  • feat: add user authentication module
  • fix: resolve crash on form submission
  • docs: update contribution guidelines

Types:

  • feat: New features
  • fix: Bug fixes
  • docs: Documentation updates
  • style: Code style changes (formatting, missing semicolons, etc.)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks

3. 🧹 Atomic Commits

  • Each commit should focus on a single purpose.
  • Avoid combining unrelated changes in one commit.

4. πŸ”„ Keep Your Branch Up-to-Date

  • Regularly sync your branch with the upstream main branch to avoid conflicts.
git fetch upstream
git merge upstream/main

5. βœ… Code Review Ready

  • Before pushing your changes:
    • Run tests to ensure nothing is broken.
    • Check your code for typos and unnecessary changes.

6. πŸš€ Push Regularly

  • Push your commits frequently, but only when the branch is in a functional state.
git push origin branch-name

7. πŸ•΅οΈ Review Before Pushing

  • Check your changes before committing:
git diff

8. 🌍 Collaborate with Pull Requests (PRs)

  • Always open a PR for merging changes.
  • Ensure PRs are small, focused, and well-documented.
  • Use draft PRs for ongoing work to gather feedback.

9. πŸ”„ Resolve Conflicts Carefully

  • When conflicts arise, resolve them carefully and test your code before committing the resolution.

Following these guidelines ensures a smooth, collaborative Git workflow and keeps the project maintainable! πŸš€ If you need help, feel free to ask.

@danielcdz danielcdz pinned this issue Dec 6, 2024
@danielcdz danielcdz changed the title GIT Guidelines Git Guidelines πŸˆβ€β¬› Dec 7, 2024
@KaizeNodeLabs KaizeNodeLabs locked as resolved and limited conversation to collaborators Dec 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant