-
Notifications
You must be signed in to change notification settings - Fork 27
How to contribute
The Enarx project welcomes contributions!
You will find some information here that aims to make it easier for newcomers to contribute.
We are moving to Gitter for general conversations to allow for different rooms and fully logged conversations.
IRC (currently experimentally bridged to Gitter, via matrix): #enarx on freenode
We will have a meeting on 2019-12-28 at 1100-1200 EST (typically 1600-1700 GMT, 1700-1800 CET), using Bluejeans: https://bluejeans.com/567757956. Everybody is welcome.
From 2019-12-02, we will be having daily stand-up meetings at 0930-1000 EST (typically 1430-1500 GMT, 1530-1600 CET), using Bluejeans: https://bluejeans.com/384678066. Everybody is welcome.
- View our project-level kanban board
- Or individual projects via their own issue databases
To contribute to the Enarx repos, you should follow a few recommendations.
We adhere to upstream Rust coding style guidelines. For more information about the Enarx coding style, plese refer to our documentation on this subject.
You will also need to set up your environment if you haven't already done so.
Here are a few pointers to help you set up your git environment.
- Ensure you have an SSH key set up. If you do not, you can generate one with the following command:
-
ssh-keygen -t ed25519 -C "$(whoami) on $(hostname), generated on $(date -I)"
Then add it to your Github profile.
-
- Fork the desired repo on github.com to your user, to be able to work on your own version of the code before submitting it. On a given repo, use the "fork" button at the top right.
- If you have not already done so, set your username and email:
git config --global user.name "your name"
git config --global user.email "[email protected]"
- Clone your fork locally:
git clone https://github.com/<your_username>/<enarx_repo>
- Add an "upstream" remote to your local git repo:
git remote add upstream https://github.com/enarx/<enarx_repo.git>
- To check the remote repositories:
git remote -v
- Create a branch for your work:
git checkout -b <your_working_branch>
- Make your changes, then add the changed files to the staging area:
-
git add <file>
(orgit add -a
to take into account all modified files, including deletions)
-
- Commit your changes:
git commit -m "commit message here"
- Push your changes:
git push
- If this is your first commit on your new branch, you will need to create the new branch remotely before pushing to it. This can all be done in one command with:
git push --set-upstream origin <your-branch-name>
. Git should suggest this as a command when a regular push fails.
With this, your code is visible in your personal repo on Github and can be shown to others, for instance.
When you consider your code to be ready, you can make a request for that code to be reviewed and, if al goes well, merged into the main code base: a Pull Request (or PR).
On Github, go to your personal repo (the one you git clone
d earlier) and find the branch you worked on. You can see your branches at: https://github.com/<your_username>/<enarx_repo>/branches
.
You can then click on "New pull request".
If your PR includes multiple commits, explain what you are trying to achieve, to give context to the reviewers. If your code fixes a specific issue, mentioning that issue (with #issue_number) is helpful too. Doing so — by effectively saying something such as: "Fixes #123" — will close the corresponding issue when your PR is accepted.
Once you are ready, click on "Create pull request".
You have just contributed code to the project, thanks!
Our recommendation is to commit incrementally, whether it works or not, and to push it to your personal repo.
When your code is at a point at which you're ready to merge it, squash all the "stream of consciousness" commits into a series of logical commits. This helps maintain a history of code changes that is both truthfull and readable to others.
As the project keeps moving, the code base will change. Once changes have been made to the Enarx repo, to keep your local version of the code up to date:
-
Sync the fork:
git fetch upstream
- Ensure you are on your master branch:
git checkout master
- Make sure your local master branch is up to date with the upstream (that any commits you've made that aren't already in upstream/master are replayed on top of that other branch):
git rebase upstream/master
From then on, you can go on to making changes again on your working branch, committing them etc..