Replies: 13 comments
-
I always push to my github and start the PR from my github webpage. Maybe there are other ways, but this works. |
Beta Was this translation helpful? Give feedback.
-
OK. I will try the same using my fork. I understood one push for every change (value / entity) or can I do a couple of changes within one push? So I made my first PR for ems-esp :) |
Beta Was this translation helpful? Give feedback.
-
@MichaelDvP @proddy May I get your help please: As you have seen I made my first PR using my fork. I have seen that you merged with other changes. When I try to synchronize in VSC I get the following GH error:
Any I idea what I did wrong and how to correct it? |
Beta Was this translation helpful? Give feedback.
-
... I found a VSC settings to disable git pull tags. But now I struggle with changes on my forked repository and changes I have done in the meantime in VSC to test a new entity. What would be the right behavior? Actually I am stuck here: error: Pulling is not possible because you have unmerged files. |
Beta Was this translation helpful? Give feedback.
-
You can merge the remote to your local repo if there are differences. First commit your changes to local repo, then fetch and merge the remote. If you have Git-Gui instaled, this is sometimes easier as commandline or VSC to manage commits and branches. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I was not clever enough to commit my changes to local repro before fetch and merge the remote. Now I have in VSC conflicts. Any proposal what to do? |
Beta Was this translation helpful? Give feedback.
-
Conflicts are shown in VSC like below with the options how to resolve. Resolve the conflicts, save files, stage (+ behinde filename), then you can commit the merge. |
Beta Was this translation helpful? Give feedback.
-
Yes that's what I have done. After committing the merge I had double entries in boiler.h . Deleting these double entries, the build works again but I now have 3 commits on my fork. 1 for the changes for a new entity (wwmaxtemp) and one for the Merge and one for the correction of boilers.h. This does not look correct. Any idea how to get this corrected? |
Beta Was this translation helpful? Give feedback.
-
Please advice what to do. Can I continue with these 3 commits or do I have to reset something? I would like to continue with other changes / additions but I am not sure if everything is right or might I loose further changes / commits when I just go on? |
Beta Was this translation helpful? Give feedback.
-
just do a PR and we'll clean it up centrally. The way I work is a combination between VSC, GitHub CLI and GitHub web as I don't always trust the CLI. I do
you can do all of this within VSC too (just "Pull, Push" -> "Pull from..." -> upstream) but sometimes I run into merge conflicts. If you prefer command lines you can do |
Beta Was this translation helpful? Give feedback.
-
Yes this happens sometimes, git shows the commits you have done, there is nothing wrong. But you need to do one commit more to add the formatting back (edit boiler.h, press Alt-Shift-F). Or you do an "Undo last commit", open boiler.h in editor and press Alt-Shift-F for formatting, stage and commit again, but this will throw errors when trying to push to githube, because the commits are different now. |
Beta Was this translation helpful? Give feedback.
-
Thanks @proddy for your fast reply. Understood and I will make a PR now. |
Beta Was this translation helpful? Give feedback.
-
@MichaelDvP Thanks as well ..... I still struggle to fully understand the GH concept of committing, merging, undoing commits and staging. But the ems-esp software is quite an excellent masterpiece of software. Congratulations to you both. |
Beta Was this translation helpful? Give feedback.
-
I learned how to do code changes and adding new entities / fields into the ems-esp code. #508
There is a guide "contributing.md" how to make the PR. I just ask myself if my set-up is correct for contributing to pull-request.
I use VSC on a Windows 11 Desktop PC. Within a new folder I issued the command: git clone https://github.com/emsesp/EMS-ESP32.git
While using VSC with PlatformIO I could then build new Firmware and could do code changes. So far so good for testing.

All changes are then maintained in VSC:
Can I just commit this changes into dev version? Or is there another way to do pr's?
Or should I fork into my own gh repository first, then clone this own forked repository and commit changes from VSC to my own repro? And then manually make pr's by selecting the right files from gh?
Beta Was this translation helpful? Give feedback.
All reactions