Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does "pure git" have the concept of a pull request?

Of course, there's git pull, but is there a formalized method (i.e. not an ad hoc method such as sending an email) of making a pull request in "pure" git?

like image 645
Mark Harrison Avatar asked Mar 01 '16 03:03

Mark Harrison


People also ask

Is a pull request a Git concept?

A pull request is an event in Git where a contributor asks a maintainer of a Git repository to review code they want to merge into a project. Watch this intermediate Git tutorial video to see how you can fork a Git repository on a remote hosting service, like GitHub.

Does Git support pull requests?

The git request-pull command can be used to create a "pull request" in native git. When run, Git generates a summary of changes to a project and the Git Repository URL where the code can be pulled from.

Is Git pull and pull request same?

The term pull is used to receive data from GitHub. It fetches and merges changes from the remote server to your working directory. The git pull command is used to pull a repository. Pull request is a process for a developer to notify team members that they have completed a feature.

Why does Git call it a pull request?

Pull requests are a feature specific to GitHub. They provide a simple, web-based way to submit your work (often called “patches”) to a project. It's called a pull request because you're asking the project to pull changes from your fork.


1 Answers

The answer is yes.

The pull request is based upon git internal feature name : request-pull

git request-pull

Here are the doc for this feature

  • https://git-scm.com/docs/git-request-pull
  • https://www.kernel.org/pub/software/scm/git/docs/git-request-pull.html

Based upon this concept the pull request was created and you can imagine were the name came from....


Other similar methods:

git format-patch

git format-patch master --stdout > XXXX.patch

git format-patch

This command will create patch which can later on can be applied on top of any other commit using the git apply command

Prepare each commit with its patch in one file per commit, formatted to resemble UNIX mailbox format. The output of this command is convenient for e-mail submission or for use with git am.

git apply

Reads the supplied diff output (i.e. "a patch") and applies it to files. With the --index option the patch is also applied to the index, and with the --cached option the patch is only applied to the index.

Without these options, the command applies the patch only to files, and does not require them to be in a Git repository.

like image 165
CodeWizard Avatar answered Oct 11 '22 16:10

CodeWizard