Tutorial Contributing Back To ESPEasy
If you followed Tutorial_preparing_to_work_with_github and you've made some changes, they you're ready to contribute them back to us.
This will make sure your changes will be in the next release so you dont have to make the same changes again.
Also it makes ESPEasy better for everyone.
Before you continue, make sure that your changes follow our guidelines: ESPEasyDevelopmentGuidelines
When you commit a change, you add it to the git-history. Its best to make a commit for every logical thing you've did.
So if you are going to fix 2 different bugs, make a separate commit for each one.
If you're working on a new plugin, its ok to do several commits during the development process. This might keep things more clear for yourself, and also allows you to undo mistakes by rolling them back.
If you really want to learn how to work with Git, we can recommend the free Pro Git book: https://git-scm.com/book/en/v2
Commiting with Github desktop
- Open Git Desktop to view your changes:
- Review the changes to make sure there are no unexpected changes or mistakes left.
- Add a commit message describing what you fixed or added:
- Press Commit to commit the changes.
Now you can go on and make more changes.
Press the Sync button to publish your changes to github, that way you also have a backup, and other people can see what you're working on.
When you've something you want to contribute with us go to the next step.
Creating a pull request
If you made a bunch of changes you want to send to us, its time to make a pull request.
- Press the pull request button and add a message that describes the bunch of commits you've made. We only made one small change, so we use the same message:
- Press Send pull request and hope everything goes well:
- You can view your pull request on github as well:
Making additional changes
Now its up to us to allow these changes to be added to the main repository. (Thats called Merging)
Its possible we give you some feedback first: We might have questions, or we might require some additional changes.
If you make additional changes, you can just commit them and press the sync button. They will then automatically end up in the existing pull request.
Starting something new
If you want to start something new, you DONT want those commits to go in to the existing pull request.
When this is the case, its time for a new branch.
- When you make a new branch, make sure the From branch is pointed to letscontrol:
- Now you can make changes and commit to this new branch:
- When the branch is ready its time for a pull request for this branch as well. Again, make sure its going into the letscontrol:
This way you can work on multiple branches (and pull requests) at the same time.
If someone asks you to change something in a previous pull request: just switch to that branch, make the change, commit and hit the sync button.