Branch Management and Workflow Best Practices

Maintaining Consistency Between development and src Branches

The development and src branches should maintain a high degree of consistency, particularly with core project files like .eleventy.js, package.json, and .gitignore. This consistency simplifies the deployment process and reduces the potential for errors.

Rationale

package.json Consistency

The package.json file, which defines project dependencies and scripts, should be identical across both branches.

.eleventy.js and .gitignore Consistency

Efficiently Updating the src Branch

When updating the src branch with changes from the development branch, it's crucial to avoid copying the entire development branch's contents. This can lead to unintended changes and clutter.

Recommended Workflow

  1. Develop and Test in development: Make all changes and test them thoroughly in the development branch.
  2. Use a "Stash" Folder:
  3. Switch to src Branch: Switch to the src branch in GitHub Desktop.
  4. Copy from "Stash" to src: Copy the files from the "stash" folder to the src branch.
  5. Commit and Push: Commit the changes in GitHub Desktop with a clear message, and push them to the remote src branch.

Rationale

Key Considerations

By incorporating these guidelines into your documentation, you'll provide a comprehensive understanding of branch management and best practices for your 11ty project.