I opened a pull request to rails repo on github by using Fork & Edit this file file button.
Now,
After getting feedback on my PR, I wanted to add some more commits. so here is what I ended by doing
$ git clone git@github.com:gaurish/rails.git #my forked repo
$ git rebase -i 785a2e5 #commit hash of my commit using which PR was opened
$ git checkout patch-3 #branch name I had to send my commits under to be shown in that PR
$ git commit -am "Changes done as per feedback"
$ git push origin patch-3
This worked fine but seems quite a complex workflow. Maybe I am wrong something wrong here?
my question is:
Am I doing this the correct way? if not, then what is the proper way to do this?
Since you’re using GitHub’s tools and just changing one file, you could also browse to the file on GitHub, select the proper branch from the upper left corner under the “tree:” dropdown (
patch-3in your case), and now choose “Edit this file”. Now your changes will be committed to this branch and will show up in your pull request