From 9f6ecbac3d5865afbf572c3baf5c489c1241b16d Mon Sep 17 00:00:00 2001 From: s-hadinger <49731213+s-hadinger@users.noreply.github.com> Date: Wed, 9 Oct 2019 21:47:04 +0200 Subject: [PATCH] update git howto --- Sensor-API.md | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Sensor-API.md b/Sensor-API.md index 674a4af3..9bc88207 100644 --- a/Sensor-API.md +++ b/Sensor-API.md @@ -19,14 +19,25 @@ This wiki page is an attempt to document the Tasmota sensor API for sensor drive * Do not assume others will know immediately how to use your addition and know that you will need to write a Wiki for it in the end. # Managing a Forked Branch -- git checkout Tasmota development branch -- git pull upstream development - Now the local branch is synced to the Tasmota repo -- git checkout -b -- git push --set-upstream origin +If you plan to submit a PR bigger than a simple change in one file, here is a short intro about how to do a clean PR. + +- fork the Tasmota repository in Github +- `git clone https://github.com//Sonoff-Tasmota.git` and work on your local copy +- `git remote add upstream https://github.com/arendst/Sonoff-Tasmota.git` +- `git checkout development` +- `git checkout -b ` to create a working branch where you can push commits +- `git push --set-upstream origin ` +- work on your local version and push as many commits as you want + +When you think it is ready to merge and submit a PR: +- `git checkout development` to go back to the main branch +- `git pull upstream development` to update all the latest changes +- `git push` to update your fork +- `git checkout -b ` to create a new branch for the final PR +- `git push --set-upstream origin ` - Merge the edits but be sure to remove the history of your local commits -- git merge --squash -- git commit -m "Message" +- `git merge --squash ` +- `git commit -m "Message"` Now you have a clean single commit from which you can create the PR on the Tasmota Github.