-
Notifications
You must be signed in to change notification settings - Fork 6
How To Contribute
Vuong edited this page Nov 3, 2020
·
10 revisions
We will work off the forking model: https://guides.github.com/activities/forking/
-
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
Create a branch for your development
git checkout -b theme/theme_A1
- 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
- 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"
- 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
- Point your router's theme URL to: https://tomatothemebase.eu/wp-content/uploads (as per usual)
- Choose your new/updated theme
- Voila!
For the sake of brevity, some details have been omitted. To harness the power of git, we recommend some more reading:
- https://docs.github.com/en/free-pro-team@latest/github/using-git
- https://docs.github.com/en/free-pro-team@latest/github/committing-changes-to-your-project
- https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests
- https://github.com/features/codespaces (Cloud IDE. In beta. Request access)