Skip to content

Contributing to Repo Guide

Ethan Cavill edited this page Jul 9, 2024 · 2 revisions

Getting Started with Development

Request Access and Set Up SSH Keys

  1. Request Access:

    • Ensure you have requested and been approved as a collaborator for the project repository.
  2. Set Up SSH Keys:

Pull the Repository

  1. Clone the Repository:
    • Open your terminal and run:
      git clone git@github.com:earcherc/deep-work.git
      cd deep-work

Create a Feature Branch

  1. Create a New Branch:
    • Create a new branch for your feature:
      git checkout -b feature/your-feature-name

Push Branch and Create Pull Request

  1. Push Your Branch:

    • Push the branch to the repository:
      git push origin feature/your-feature-name
  2. Create a Pull Request:

    • Go to the repository on GitHub and create a pull request from your feature branch to the master branch.

Get Review and Address Comments

  1. Review Process:
    • Wait for the pull request to be reviewed by other collaborators.
    • Address any comments or requested changes.

Rebase and Squash Commits

  1. Rebase Commits:

    • To ensure a linear git history with clean commit messages, use interactive rebase to clean up commits:
      git rebase -i HEAD~n  # where n is the number of commits you want to rebase
  2. Squash Commits:

    • During the interactive rebase, mark which commits can be squashed to convey clear landmarks.
    • This is to reduce commit bloat, e.g. multiple 'fix' commits can be squashed to an appropriate checkpoint.

Final Approval

  1. Approval:

    • Once all comments are addressed and commits are cleaned up, request final approval for the pull request.
    • Ensure rebase commits and squash commits are allowed.
  2. Merge:

    • After approval, merge the pull request to the master branch.

Tools

  • Interactive Rebase:
    • You can use the interactive rebase tool in VSCode to clean up commits.
    • For more information on using interactive rebase, refer to VSCode's interactive rebase guide.

Feel free to reach out if you have any questions or encounter any issues during the development process. Happy coding!

Clone this wiki locally