I have question about GitHub — how they implemented Pull Request feature. Git SCM itself has git-request-pull commands. According to this answer GitHub can use git-request-pull and git-format-patch to do this.
How they implemented this feature? And what about Gitorious and Gitlab? How they did the same?
They store the name of the branch from which you want to pull and generate diffs using git diff ^target-branch pull-head
. When you accept the pull request, they simply run git merge pull-base
.
They do not use git request-pull
. There is even a discussion where Linus Torwalds insults them for it :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With