Created How to properly submit a PR (markdown)

This commit is contained in:
Blaž Kristan 2021-05-20 10:18:40 +02:00
parent 74cbd4c827
commit a6685dc509
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
# Managing a Forked Branch
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 WLED repository in Github
* `git clone https://github.com/<github_user>/WLED.git` and work on your local copy
* `git remote add upstream https://github.com/Aircoookie/WLED.git`
* `git checkout master`
* `git checkout -b <temp_branch>` to create a working branch where you can push commits
* `git push --set-upstream origin <temp_branch>`
* 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 master` to go back to the main branch
* `git pull upstream master` to update all the latest changes
* `git push` to update your fork
* `git checkout -b <pr_branch>` to create a new branch for the final PR
* `git push --set-upstream origin <pr_branch>`
* Merge the edits but be sure to remove the history of your local commits
* `git merge --squash <temp_branch>`
* `git commit -m "Message"`
Now you have a clean single commit from which you can create the PR on the WLED Github