Bootstrap FreeKB - Git (Version Control) - pull request
Git (Version Control) - pull request

Updated:   |  Git (Version Control) articles

A pull request is a way for you to request changes you made to a file in a branch of a cloned repository or to a file in a forked repository to be merged into the original source repository.

Before creating a pull request, you will do one of the following:

In this example, the forked foo.git repository would be owned by the person that created the fork (jane.doe in this example).

 

As an example, let's say the foo.git repository contains a file named bar.txt and bar.txt contains the following.

Hello World

 

Let's say you want to update bar.txt to have "Goodbye World". In your branch or forked repository, you would create a commit with the change you made to bar.txt.

git commit -m "from Hello World to Goodbye World" bar.txt

 

You would then issue a pull request with a comment like "I would like to update bar.txt to have Goodbye World". This should create a new branch that has your name (john.doe in this example) and the name of the file (bar.txt in this example).

~]$ git branch -a
* master
  remotes/origin/master
  remotes/origin/HEAD -> origin/master
  remotes/origin/john.doe/bartxt-1663821786430

 

This should also notify the reviewers of bar.txt of the change you would like to make. If the reviewers approve your change, then you should be able to updated bar.txt in your branch to have "Goodbye World", commit bar.txt in your branch, and merge bar.txt into the master branch.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter c5d586 in the box below so that we can be sure you are a human.