We definitely appreciate contributions in any form — QA, submitting issues, providing feedback, code, design, etc.
If you're part of the Liferay team in Figma, there's a Liferay.Design project — you can see where we're at and contribute comments, designs, etc there.
If you'd like to help manage deployments, please request to join our Netlify team!
A good place to start is our Issues page!
If this is your first time using GitHub, see our initial set up suggestions.
(If "local", "origin", and "upstream" are greek to you, see this top answer on Stack Overflow.)
Important Notes
All work should be done on a named branch — e.g. 'Issue-302' and pull-request sent to the master
branch.
We always Rebase & Merge
pull requests so that the commit history is kept as clean as possible — to that end, be sure to follow the best practices outlined below to avoid merge conflicts in your PRs.
If you don't have a pull-request in review, pull the latest from upstream so that you are using the freshest code:
git pull upstream master
If you're prompted to do a merge commit (you probably will be), hit :wq
to close the merge comment, and then do a hard reset so that your local matches what is upstream:
git reset --hard upstream/master
Continue to push your commits up to your origin — they will automatically get added to your open pull-request.
Be sure to follow step #1 — pull fresh from upstream and do a hard reset (shortcut: git pull upstream master && git reset --hard upstream/master
) — this ensures that your next pull-request will only include new commits.
If you don't pull from upstream after your PR gets merged; you will get errors because the commit hashes change one they are merged into upstream.
If you have write
permissions to the repo, once you ensure the site works using Netlify's deploy previews, you can push to production.
git pull upstream master && git reset --hard upstream/master
master
branch to production
: git branch -m production
production
branch to upstream: git push upstream production --force
That's it! In 2-4 minutes, the site will be built, deployed, and all updates will be reflected live on liferay.design.
This can happen for a myriad of reasons — but essentially it boils down to your local repo not being in-line with what is upstream. This is usually because:
Someone else's work was merged before you had a chance to send a PR.
You sent a PR, it was merged, but you didn't pull and reset your local repo to match upstream.
Don't worry — it's no big deal. There are two quick ways to solve it:
If you have a lot of commits, or enough code that it would be a pain to copy/paste — stashing and then cherry picking your work is a good idea.
git checkout -b temp-branch
)git pull upstream master && git reset --hard upstream/master
)git log
)git cherry-pick commit-sha
) Note: 'commit-sha' being what you see in step 3Note: See Atlassian's 'Git Cherry Pick' tutorial for a more in-depth explanation on picking cherries.
If option 1 sounds like way too much work — or if you tried it and it didn't work — then you can always:
ctrl+c
your workgit pull upstream master && git reset --hard upstream/master
)ctrl+v
A few aliases that will make your life easier. If you think 'Alias' is just an overrated Jennifer Garner show, check out this blog post for more information and kick your workflow into hyperspeed.
Use this after your PR is merged or if you haven't done any recent development on the site.
alias gstart="git pull upstream master && git reset --hard upstream/master"
alias pushprod="git branch -m production && git push upstream production --force"
alias reset="git branch -m master && git pull upstream master && git reset --hard upstream/master"
Try this first if you run into any errors when trying to start local development:
alias reinstall="rm -rf node_modules && npm install"
rm -rf node_modules
will delete your node_modules
folder, and npm install
will install everything. This will fix 96% of the errors you encounter.
See full the full Contributing guidelines for a more exhaustive process.
We definitely appreciate contributions in any form — QA, submitting issues, providing feedback, code, design, etc.
If you're part of the Liferay team in Figma, there's a Liferay.Design project — you can see where we're at and contribute comments, designs, etc there.
If you'd like to help manage deployments, please request to join our Netlify team!
A good place to start is our Issues page!
(If "local", "origin", and "upstream" are greek to you, see this top answer on Stack Overflow.)
Important Notes
All work should be done on the master
branch (or you can create your own branch and request to merge it with the master
branch.
We always Rebase & Merge
pull requests so that the commit history is kept as clean as possible — to that end, be sure to follow the best practices outlined below to avoid merge conflicts in your PRs.