-
-
Notifications
You must be signed in to change notification settings - Fork 115
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get organized for pull-request with VSC? #509
Comments
I always push to my github and start the PR from my github webpage. Maybe there are other ways, but this works. |
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 :) |
@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? |
... 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. |
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. |
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? |
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? |
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? |
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 |
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. |
Thanks @proddy for your fast reply. Understood and I will make a PR now. |
@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. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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.
![image](https://user-images.githubusercontent.com/36480251/169061252-0d9ac208-bb40-4fab-a3a2-6616bbc73a7f.png)
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?
The text was updated successfully, but these errors were encountered: