Hi,
when I want to make a small PR changing a few lines in a file or two (sometimes even to fix a typo), do I really have to follow the whole procedure of downloading the source code to a computer, creating a branch, making the changes locally, pushing the changes to my GitHub repository and sending a PR ? Some time ago it was possible to do it directly on GitHub for a single file (I just had to click Edit and it created a branch automatically). But now it seems to be impossible:
What's the easiest way now (possibly directly on GitHub) ? Do I have to create branches manually for each small PR ?
Pull Requests directly on GitHub
Re: Pull Requests directly on GitHub
Yep, I noticed the same thing yesterday when I went to create a simple PR so I found the best way is to create a new branch on Github and to be honest it makes you think of a proper name rather than patch-n but it's a more convoluted process than previously.
Re: Pull Requests directly on GitHub
All right, I figured it out. So each time I have to create a branch, update it, make the changes and then I can send the PR. Well, the advantage of this is that now I can make changes to more than 1 file for each PR (previously I had to make 2 PRs if 2 files were edited directly).
Re: Pull Requests directly on GitHub
NewJoker wrote: ↑Sat Aug 05, 2023 4:07 pm ...
All right, I figured it out. So each time I have to create a branch, update it, make the changes and then I can send the PR. Well, the advantage of this is that now I can make changes to more than 1 file for each PR (previously I had to make 2 PRs if 2 files were edited directly).
Another advantage is in a philosophical optics that you will be more diligent when coding, to avoid typos and trivial errors, as the procedure for fixing is more complicate.

Same as example if you are using a "linter" during coding, after having coded something, you will see 100 and more errors, (I experience this when I edit some old code made at beginning), interesting things, code is working, but is very ugly and "bad coded", so I spend some time to clean it and then the result is that some errors now are more visible, as the linter is spotting as example:
Code: Select all
if something == False:

Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
- andrecaldas
- Posts: 300
- Joined: Fri Jan 27, 2023 8:45 pm
- Contact:
Re: Pull Requests directly on GitHub
I am not really sure of what I am talking about... I don't know much about git.NewJoker wrote: ↑Sat Aug 05, 2023 11:00 am [...] do I really have to follow the whole procedure of downloading the source code to a computer, creating a branch, making the changes locally, pushing the changes to my GitHub repository and sending a PR ?
[...]
What's the easiest way now (possibly directly on GitHub) ? Do I have to create branches manually for each small PR ?
But maybe you can keep a "small PRs" branch in your repo. Then, every time you have a small PR, you can use this branch. After the PR has been accepted, (I believe) this branch can be reused for a new PR. You merge master (main) into it (or rebase) and produce your new PR.
The downside is that you have to wait the first PR to be accepted to submit a second PR using the same branch.
Does it make sense?