{"id":24626433,"url":"https://github.com/thaitechtales/git","last_synced_at":"2025-03-20T00:13:17.760Z","repository":{"id":271630573,"uuid":"913828019","full_name":"ThaiTechTales/git","owner":"ThaiTechTales","description":"This repository serves as a centralised hub for all Git-related projects, conventions, and tools. Its aim is to standardise, document, and streamline Git workflows and practices, ensuring a consistent and efficient approach to source control management across various projects.","archived":false,"fork":false,"pushed_at":"2025-02-10T07:27:13.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T08:22:54.588Z","etag":null,"topics":["branching-strategies","ci-cd","collaboration","devops","distributed-systems","git","git-workflow","open-source","source-code","vcs","version-control"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThaiTechTales.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-08T12:35:32.000Z","updated_at":"2025-02-10T07:27:16.000Z","dependencies_parsed_at":"2025-01-08T23:44:00.006Z","dependency_job_id":null,"html_url":"https://github.com/ThaiTechTales/git","commit_stats":null,"previous_names":["thaitechtales/git"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThaiTechTales%2Fgit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThaiTechTales%2Fgit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThaiTechTales%2Fgit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThaiTechTales%2Fgit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThaiTechTales","download_url":"https://codeload.github.com/ThaiTechTales/git/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244525621,"owners_count":20466548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["branching-strategies","ci-cd","collaboration","devops","distributed-systems","git","git-workflow","open-source","source-code","vcs","version-control"],"created_at":"2025-01-25T04:48:46.707Z","updated_at":"2025-03-20T00:13:17.752Z","avatar_url":"https://github.com/ThaiTechTales.png","language":"Shell","readme":"# Git Projects Repository\n\n## Purpose\n\nThis repository serves as a centralised hub for all Git-related projects, conventions, and tools. Its aim is to standardise, document, and streamline Git workflows and practices, ensuring a consistent and efficient approach to source control management across various projects.\n\n## Intention\n\n- To provide a comprehensive guide to Git best practices, including branching strategies, commit message conventions, and collaborative workflows.\n- To consolidate Git-related scripts, commands, and automation tools for easier integration and reuse across projects.\n- To serve as a reference point for source control strategies that enhance project organisation, team collaboration, and version management.\n\n## Scope\n\nThis repository includes, but is not limited to, the following areas:\n\n- **Source Control Strategy:** Standardising branch naming conventions, prefixes, and workflows for consistency across projects.\n- **Commit Messages:** Crafting clear, professional, and technically accurate commit messages.\n- **Git Commands and Scripts:** Useful commands, aliases, and scripts to automate or simplify Git tasks.\n- **Git Projects and Conventions:** Custom Git workflows, projects, and tools for specialised requirements or use cases.\n\n## Source Control Strategy\n\nTo ensure consistency, scalability, and maintainability across all repositories and its projects, the following source control strategy will be followed. Branching is organised using the structure:\n\n```bash\n\u003cproject-name\u003e/\u003cbranch-type\u003e/\u003cspecific-task\u003e\n```\n\n### Branching Overview\n\n**main/**\n\n- Represents production-ready code. This branch contains projects that have been built, tested, and are ready for deployment. All completed work is eventually merged into main.\n\n**\u003cproject-name\u003e/dev**\n\n- The default branch for active development within a project. It should always remain stable enough for integration testing and serves as the base branch for feature branches.\n\n**\u003cproject-name\u003e/feature/\u003cspecific-task\u003e**\n\n- For new features or enhancements. These branches are created from `dev`, worked on, and merged back into dev upon completion.\n  - **Example:** project-a/feature/infra-setup\n\n**\u003cproject-name\u003e/bugfix/\u003cspecific-task\u003e**\n\n- For fixing bugs identified during development or testing. These branches are created from dev and merged back into dev after the issue is resolved.\n\n  - **Example:** project-b/bugfix/fix-logic-error\n\n**\u003cproject-name\u003e/hotfix/\u003cspecific-task\u003e**\n\n- For urgent fixes to production issues. These branches are created directly from main, then merged back into both main and dev.\n\n  - **Example:** project-c/hotfix/security-patch\n\n**\u003cproject-name\u003e/release/\u003cversion\u003e**\n\n- For preparing a project for release. These branches allow for final tweaks, minor fixes, and version tagging. Once ready, they are merged into main and tagged with the release version.\n\n  - **Example:** project-a/release/v1.0.0\n\n**\u003cproject-name\u003e/chore/\u003cspecific-task\u003e**\n\n- For minor tasks that are not feature-related, such as updating dependencies, improving documentation, or cleaning up code.\n\n  - **Example:** project-c/chore/update-gitignore\n\n### Branching Examples\n\n```bash\naws/\n│── chore/\n│   └── docs                        # Documentation updates at the root level\n├── project-a/\n│   ├── dev                         # Main development branch for Project A\n│   ├── feature/\n│   │   ├── add-infra               # Adding infrastructure setup\n│   │   ├── add-routing             # Adding routing configurations\n│   ├── bugfix/\n│   │   └── fix-cidr-mismatch       # Fix CIDR block mismatch issue\n│   ├── hotfix/\n│   │   └── sg-rule-error           # Urgent fix for security group rules\n│   ├── release/\n│   │   └── v1.0.0                  # Release preparation branch\n│   └── chore/\n│       └── update-docs             # Update README or other documentation\n├── project-b/\n│   ├── dev                         # Main development branch for Project B\n│   ├── feature/\n│   │   ├── enable-lifecycle-rules  # Adding lifecycle rules\n│   │   └── add-versioning          # Enabling versioning\n│   ├── bugfix/\n│   │   └── fix-policy              # Fix incorrect policy\n│   ├── hotfix/\n│   │   └── access-issue            # Fix urgent access issues\n│   └── chore/\n│       └── clean-unused-resources  # Maintenance task to clean unused resources\n├── project-c/\n│   ├── dev                         # Main development branch for Project C\n│   ├── feature/\n│   │   ├── add-dynamodb-trigger    # Adding trigger for DynamoDB\n│   │   └── optimize-memory-usage   # Optimizing memory usage\n│   ├── bugfix/\n│   │   └── fix-timeout-error       # Fix timeout issue\n│   ├── hotfix/\n│   │   └── iam-policy-fix          # Urgent IAM policy correction\n│   └── chore/\n│       └── update-dependencies     # Update dependencies\n├── main                            # Central production-ready branch\n\n```\n\n## Commit Messages\n\nWriting clear and professional commit messages is crucial for maintaining an understandable project history.\n\n### Structure of a Commit Message\n\nEach commit message should consist of two parts:\n\n**Title:**\n\n- A concise, imperative sentence summarising the change.\n- Imperative Tone: Always write the title in imperative mood as if commanding an action (e.g., \"add\", \"fix\", \"remove\", \"update\").\n- To maintain consistency, use prefixes to indicate the purpose of the commit:\n\n    | Prefix    | Use Case                                            |  Example                                          |\n    | ----------| ----------------------------------------------------| --------------------------------------------------|\n    | feat      | For new features or enhancements                    | `feat: add lifecycle rules for S3`                |\n    | fix       | For bug fixes                                       | `fix: resolve timeout error in Lambda`            |\n    | docs      | For documentation updates                           | `docs: update README with usage details`          |\n    | style     |For code formatting (non-functional changes)         | `style: format main.tf with terraform fmt`        |\n    | refactor  | For code refactoring (no functionality change)      | `refactor: optimise loop logic in script`         |\n    | test      | For adding or updating tests                        | `test: add unit tests for DynamoDB triggers`      |\n    | chore     | For minor tasks (e.g., dependency updates)          | `chore: update dependencies in requirements.txt`  |\n\n- Example:\n\n    ```bash\n    feat: add lifecycle rules to s3 bucket\n    ```\n\n**Description (optional, but highly recommended):**\n\n- A more detailed explanation of what was changed, why it was changed, and any relevant technical details.\n- Use bullet points for readability if there are multiple points.\n- Be Descriptive:\n  - Explain what was done and why.\n- Example:\n\n    ```bash\n    - Implemented lifecycle rules to automatically transition objects to Glacier after 30 days.\n    - Added Terraform configurations for S3 lifecycle policy management.\n    - This feature helps optimise storage costs for infrequently accessed data.\n    ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthaitechtales%2Fgit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthaitechtales%2Fgit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthaitechtales%2Fgit/lists"}