If you want to contribute a change to LuCI, please either send a patch using git send-email or open a "pull request" against the openwrt/luci repository.
Regardless of whether you send a patch or open a pull request, please try to follow these rules:
In case you like to send patches by mail, please use the OpenWrt Development List, although patches to luci are preferred in the luci repo on GitHub.
If you send via the OpenWrt list, include a [luci]
tag in your subject line.
For general information on patch submission, follow the OpenWrt patch submission guideline.
Pull requests are the easiest way to contribute changes to git repos at Github. They are the preferred contribution method, as they offer a nice way for commenting and amending the proposed changes.
Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request. Workflow using feature_x
as the example:
git checkout -b feature_x
git push -u origin feature_x
. That creates the feature_x
branch at your Github fork and sets it as the remote of this branchIf you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then use git push
to automatically update the pull request.
If you need to change something in the existing pull request (e.g. to add a missing signed-off-by line to the commit message), you can use git push -f
to overwrite the original commits. That is easy and safe when using a feature branch. Example workflow:
git checkout feature_x
git commit --amend
to do thatgit rebase -i HEAD~X
(X = number of commits to edit) to possibly squash some commitsgit push -f
to overwrite the original commits in the "feature_x" branch with the new ones. The pull request gets automatically updatedgit push --force
.openwrt-xx.yy
(e.g. openwrt-18.06
) are release branches.