How to keep all commits in one Pull Request.

It happened to me, I did some changes in one file of repo and pulled the request for merging.

in reply, I was asked to do some more changes to 2 other files. so i updated the theme and pulled requests for theme separately as github kept suggesting to me

but it created 3 different PRs, which I didn't find proper.

so this question came to my mind how to make the next changes to the same PR which I have pulled already?

answer:

first understand that when you make any changes to files from github web directly, github forces you to make commits for changes in each file

and every time you make a commit it also creates a new branch along with commit, so to keep those all changes in one commit

first clone your repo in locally, then you have to check out the new branch just to make them available in the local git CLI else if you try directly git will not show you those branches which you made in git_web

once you have done that

just merge the new branches to one default branch on which you pulled your first request

and your other commits will automatically update to the same PR.

Done!