How to send a pull request in GitHub

Sometimes we fork a repository from GitHub and change some codes for the program we fork. How could we update the repository with our changes in local workplace? Well, we could try pull request.

First, we should fork the repository into our local workplace.

And normally, we want to create a new branch for specific purpose we want to do.

git checkout -b feature-01

Now we are in a new branch named feature-01. And then we could add some files as we want.

After that, add all files we changed use:

git add files

And then, check if there are no untracked files:

git status

Then we could add comments:

git commit -m "add some new features"

Finally, we could push it:

git push origin feature-01

Go back to the GitHub page, click the pull request, add comments, and add reviewers in the right column. That’s all!

Oh, remember to change back to main branch:

git checkout main