Skip to content

How To Contribute

Vuong edited this page Nov 3, 2020 · 10 revisions

Some Steps on Contributing

We will work off the forking model: https://guides.github.com/activities/forking/

Step 1: Fork It

  • Go here: Fresh-Tomato/tomato-theme-base, then click the Fork button

  • Fork repo to your user space (eg. github.com/<username>/tomato-theme-base)

  • Clone repo from your user space to your local space (ie. computer)

    git clone [email protected]:<username>/tomato-theme-base.git

  • Add base repo as the upstream remote location (useful for syncing)

    git remote add upstream [email protected]:Fresh-Tomato/tomato-theme-base.git

  • This step only needs to be done once

Step 2: Branch It

Create a branch for your development

  • git checkout -b theme/theme_A1

Step 3: Change It

  • Make changes to your theme
  • See here on how to name your theme: Theme Naming Convention
  • Commit changes in your local space
git add themes
git commit -m "New theme: theme_A1
  • Sync with upstream
git fetch upstream
git merge upstream/main
  • Push changes to your user space

    git push origin

Step 4: Pull It

  • Create a Pull Request (PR) from your user space (github.com/<username>/tomato-theme-base/pulls)
  • Select your branch (eg. theme/theme_A1) on the right hand side
  • Target the upstream repo (Fresh-Tomato/tomato-theme-base) on the left hand side
  • Select update/theme from drop-down as the destination branch you would like to merge into
  • Continue by clicking "Create Pull Request"

Step 5: Merge It

  • The admins will get a notification
  • After it has been reviewed, it will be merged in
  • The merge process will kick off a process that will zip up all the themes and push it to a web server
  • Yes, you no longer have to zip the themes up yourself anymore! :)
  • From here, the zip files will be manually uploaded to tomatothemebase.eu

Step 6: Use It

Notes

For the sake of brevity, some details have been omitted. To harness the power of git, we recommend some more reading:

  1. https://docs.github.com/en/free-pro-team@latest/github/using-git
  2. https://docs.github.com/en/free-pro-team@latest/github/committing-changes-to-your-project
  3. https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests
  4. https://github.com/features/codespaces (Cloud IDE. In beta. Request access)