---
title: Merge and Pull Requests in Git
description: Learn when merge and pull requests can and should be utilized in a development project using Git. Then explore forks and their purpose.
image: https://blog.rheinwerk-computing.com/hubfs/Merge%20and%20Pull%20Requests%20in%20Git.png
---

[![Rheinwerk Computing Logo](https://blog.rheinwerk-computing.com/hubfs/computing_logo-header.svg)](https://blog.rheinwerk-computing.com/) [Blog](https://blog.rheinwerk-computing.com)

- Books 
    - Get an overview of our wide selection of books on every relevant computing topic. 
          - [General Computing](https://www.sap-press.com/rheinwerk-computing/general-computing/)
          - [DevOps](https://www.sap-press.com/rheinwerk-computing/devops/)
          - [Programming Languages](https://www.sap-press.com/rheinwerk-computing/programming-languages/)
          - [Security](https://www.sap-press.com/rheinwerk-computing/security/)
          - [Software Development](https://www.sap-press.com/rheinwerk-computing/software-development/)
- Book Subscription 
    - Get unlimited access to all Rheinwerk Computing books! 
          - [Programming Subscription](https://sap-press.com/subscriptions/)

[DevOps](https://blog.rheinwerk-computing.com/tag/devops)

# Merge and Pull Requests in Git

![Rheinwerk Computing](https://blog.rheinwerk-computing.com/hubfs/RW-logo-300x300.png)  by [Rheinwerk Computing](https://blog.rheinwerk-computing.com/author/rheinwerk-computing)

Based on the feature branch model, the major Git platforms have extended the workflow to include merge/pull requests as integral parts.

 

The major enhancement (compared to the feature branch workflow) is the mandatory review process. Let’s discuss a scenario to show merge and pull requests. A developer, Manuel, develops a new function. He does so by creating a feature-1 branch and adding two commits (a8503d6 and 70996c6). When pushing to the remote repository, Manuel receives the following response:

 

`git push --set-upstream origin feature-1`

` `

`   Enumerating objects: 7, done.`

`   ...`

`   remote:`

`   remote: To create a merge request for feature-1, visit:`

`   remote: https://gitlab.com/git-compendium/workflows-github...`

`   remote:`

`   To gitlab.com:git-compendium/workflows-github.git`

`     * [new branch] feature-1 -> feature-1`

`   Branch 'feature-1' set up to track remote branch 'feature-1'...`

![Workflow with Feature Branches and Merge/Pull Requests](https://blog.rheinwerk-computing.com/hs-fs/hubfs/2289_08_007.png?width=931&height=487&name=2289_08_007.png)

 

The lines beginning with remote indicate the response by the [Git](https://learning.rheinwerk-computing.com/devops#git) server. In modern terminals on Linux and macOS, you can click the link directly (possibly together by holding down (Ctrl)). Alternatively, you can create the merge request via the web interface.

 

![Merge Request in GitLab Created via the Web Interface](https://blog.rheinwerk-computing.com/hs-fs/hubfs/2289_08_008.png?width=1007&height=508&name=2289_08_008.png)

 

Manuel creates the merge request via the web interface and enters the name “Feature-1 merge request.” Note that this merge request isn’t a feature of Git itself, and you won’t find a reference to this request anywhere via git log. The metadata about the merge request, such as who created the request and when, is stored in the Git hosting provider’s database. If you switch providers at some point, this information is likely to be lost. A commendable exception is [GitLab](https://blog.rheinwerk-computing.com/the-differences-between-git-github-and-gitlab), which can import both the pull requests from GitHub and those from Gitea, including comments, as verified during tests.

 

Manuel enters Jane as the person responsible for the merge request. Jane reviews the new feature and asks for additional documentation for the new feature. Manuel adds the comment and commits the changes (commit e029614). Then, the version from the feature branch is installed on a test system. When the quality assurance (QA) team raises no objections to the new feature, Jane merges the changes into the main branch.

 

The workflow we’ve described is certainly widely used, not least because of the popularity of GitHub and GitLab. The processes aren’t complicated, and code review can eliminate errors before they reach the main branch. The workflow inherits the problem of branches running in parallel for too long when features are too large from the feature branch model. An additional problem with this workflow can arise if the time span between the pull/merge request and the merge itself is too long. Reasons for this delay can be that the code review doesn’t take place quickly enough or that too many problems are found during the pull request. Both extend the parallel runtime of the branches.

 

![Complete Merge Request](https://blog.rheinwerk-computing.com/hs-fs/hubfs/2289_08_009.png?width=632&height=529&name=2289_08_009.png)

 

In contrast to the previous section, you may notice a few changes in the workflow. We wanted to highlight the difference between the purely Git-based workflow and the workflow presented in this section, which can only be implemented with appropriate Git servers.

 

## Forks

You can *fork* foreign repositories using Git. In combination with merge/pull requests, you can also establish a workflow where all developers manage their own repositories to which only they have write access.

 

This approach is close to Linus Torvalds’ original idea. The inventor of Git, who had developed the software primarily to manage the Linux kernel, received a number of suggestions for improvements in the form of patch files as email attachments to the kernel mailing list. To save himself the work of incorporating and testing the patches, Torvalds suggested that patch developers maintain their own Git repositories where they can incorporate and test their own patches. Since GitHub didn’t exist back then, developers had to run their own Git servers, from which Torvalds could then pull, which is exactly what Git’s built-in server git daemon is for.

In a tech talk worth watching, Torvalds presented his motivation for creating Git in 2007, when it was just two years old. In his rather opinionated way, he condemned every other version control system, first and foremost Apache Subversion (SVN), which was the most widely used system at the time: *[https://www.youtube.com/watch?v=4XpnKHJAok8](https://www.youtube.com/watch?v=4XpnKHJAok8).*

 

Forks with pull/merge requests are an extremely useful workflow for occasional contributions by different people on other people’s projects. However, with a manageable number of members on your team who are registered with the team in some way and who have permissions to access a central repository, you likely won’t need any forks for your project in this case.

 

## Conclusion

Some advantages of using merge/pull requests include the following:

- Code review before merging on the main branch
- Good documentation of the work processes
- Stable main branch 

Some drawbacks of using merge/pull requests include the following: 

- Parallel branches when code reviews are too slow

Editor’s note: This post has been adapted from a section of the book [*Git: Project Management for Developers and DevOps Teams*](https://www.sap-press.com/git_5555/?utm_source=sappressblog&utm_medium=referral&utm_campaign=Blogs&utm_term=2289_chapter8&utm_content=2289) by Bernd Öggl and Michael Kofler. Bernd is an experienced system administrator and web developer. Since 2001 he has been creating websites for customers, implementing individual development projects, and passing on his knowledge at conferences and in publications. Michael studied telematics at Graz University of Technology and is one of the most successful German-language IT specialist authors. In addition to Linux, his areas of expertise include IT security, [Python](https://learning.rheinwerk-computing.com/python), Swift, [Java](https://learning.rheinwerk-computing.com/java), and the Raspberry Pi. He is a developer, advises companies, and works as a lecturer.

 

This blog post was originally published 9/2023.

## Recommendation

[![Git: Project Management for Developers and DevOps Teams](https://blog.rheinwerk-computing.com/hs-fs/hubfs/social-suggested-images/2289-May-17-2023-02-18-55-9770-PM-1-1.jpg?width=170&name=2289-May-17-2023-02-18-55-9770-PM-1-1.jpg)](https://www.sap-press.com/git_5555/?utm_source=sappressblog&utm_medium=referral&utm_campaign=Blogs&utm_term=2289_chapter8&utm_content=2289)

**Git: Project Management for Developers and DevOps Teams**

Get started with Git—today! Walk through installation and explore the variety of development environments available. Understand the concepts that underpin Git’s workflows, from branching to commits, and see how to use major platforms, like GitHub. Learn the ins and outs of working with Git for day-to-day development. Get your versioning under control!

[Learn More](https://www.sap-press.com/git_5555/?utm_source=sappressblog&utm_medium=referral&utm_campaign=Blogs&utm_term=2289_chapter8&utm_content=2289)

![Rheinwerk Computing](https://blog.rheinwerk-computing.com/hubfs/RW-logo-300x300.png)

**by [Rheinwerk Computing](https://blog.rheinwerk-computing.com/author/rheinwerk-computing)**

Rheinwerk Computing is an imprint of Rheinwerk Publishing and publishes books by leading experts in the fields of programming, administration, security, analytics, and more.

[DevOps](https://blog.rheinwerk-computing.com/tag/devops)

[![Share on facebook](https://7528309.fs1.hubspotusercontent-na1.net/hub/7528309/hubfs/raw_assets/public/mV0_d-web-default-modules_hubspot/img/facebook-color.png?width=24&name=facebook-color.png)](https://www.facebook.com/share.php?u=https%3A%2F%2Fblog.rheinwerk-computing.com%2Fmerge-and-pull-requests-in-git%3Futm_medium%3Dsocial%26utm_source%3Dfacebook) [![Share on linkedin](https://7528302.fs1.hubspotusercontent-na1.net/hub/7528302/hubfs/raw_assets/public/mV0_d-web-default-modules_hubspot/img/linkedin-color.png?width=24&name=linkedin-color.png)](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fblog.rheinwerk-computing.com%2Fmerge-and-pull-requests-in-git%3Futm_medium%3Dsocial%26utm_source%3Dlinkedin) [![Share on twitter](https://7528304.fs1.hubspotusercontent-na1.net/hub/7528304/hubfs/raw_assets/public/mV0_d-web-default-modules_hubspot/img/twitter-color.png?width=24&name=twitter-color.png)](https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fblog.rheinwerk-computing.com%2Fmerge-and-pull-requests-in-git%3Futm_medium%3Dsocial%26utm_source%3Dtwitter&url=https%3A%2F%2Fblog.rheinwerk-computing.com%2Fmerge-and-pull-requests-in-git%3Futm_medium%3Dsocial%26utm_source%3Dtwitter&source=tweetbutton&text=) [![Share on email](https://7528311.fs1.hubspotusercontent-na1.net/hub/7528311/hubfs/raw_assets/public/mV0_d-web-default-modules_hubspot/img/email-color.png?width=24&name=email-color.png)](mailto:?subject=Check+out+https%3A%2F%2Fblog.rheinwerk-computing.com%2Fmerge-and-pull-requests-in-git%3Futm_medium%3Dsocial%26utm_source%3Demail&body=Check+out+https%3A%2F%2Fblog.rheinwerk-computing.com%2Fmerge-and-pull-requests-in-git%3Futm_medium%3Dsocial%26utm_source%3Demail)

### Comments

### Latest Blog Posts

[![Resolving Merge Conflicts in Git](https://blog.rheinwerk-computing.com/hs-fs/hubfs/Resolving%20Merge%20Conflicts%20in%20Git.png?height=600&name=Resolving%20Merge%20Conflicts%20in%20Git.png)](https://blog.rheinwerk-computing.com/resolving-merge-conflicts-in-git)

[DevOps](https://blog.rheinwerk-computing.com/tag/devops)

## [Resolving Merge Conflicts in Git](https://blog.rheinwerk-computing.com/resolving-merge-conflicts-in-git)

[Read More](https://blog.rheinwerk-computing.com/resolving-merge-conflicts-in-git)

[![Git Error Messages (Root Causes and Solutions)](https://blog.rheinwerk-computing.com/hs-fs/hubfs/Git%20Error%20Messages%20(Root%20Causes%20and%20Solutions).jpg?height=600&name=Git%20Error%20Messages%20(Root%20Causes%20and%20Solutions).jpg)](https://blog.rheinwerk-computing.com/git-error-messages-causes-solutions)

[DevOps](https://blog.rheinwerk-computing.com/tag/devops)

## [Git Error Messages (Root Causes and Solutions)](https://blog.rheinwerk-computing.com/git-error-messages-causes-solutions)

[Read More](https://blog.rheinwerk-computing.com/git-error-messages-causes-solutions)

**Subscribe to our blog!**Get notified about future blog updates.

- <https://www.linkedin.com/showcase/rheinwerk-computing/>
- <https://www.youtube.com/channel/UChj-U-uWGM7qRlHXSFU93ew>
- <https://blog.rheinwerk-computing.com/rss.xml>

### The official Rheinwerk Computing Blog

Rheinwerk Computing is an imprint of Rheinwerk Publishing and publishes resources that will help you accelerate your computing journey. The Rheinwerk Computing Blog is designed to provide helpful, actionable information on a variety of topics, including programming, administration, security, and analytics!

### Blog Topics

- [All Topics](https://blog.rheinwerk-computing.com)
- [Programming Languages](https://blog.rheinwerk-computing.com/tag/programming-languages)
- [How To](https://blog.rheinwerk-computing.com/tag/how-to)
- [JavaScript](https://blog.rheinwerk-computing.com/tag/javascript)
- [DevOps](https://blog.rheinwerk-computing.com/tag/devops)
- [Web Development](https://blog.rheinwerk-computing.com/tag/web-development)
- [Python](https://blog.rheinwerk-computing.com/tag/python)
- [What Is?](https://blog.rheinwerk-computing.com/tag/what-is)
- [Cybersecurity](https://blog.rheinwerk-computing.com/tag/cybersecurity)
- [Software Development](https://blog.rheinwerk-computing.com/tag/software-development)
- [Java](https://blog.rheinwerk-computing.com/tag/java)

### Blog curated by

[![Rheinwerk Computing Logo](https://blog.rheinwerk-computing.com/hubfs/computing_logo-header.svg)](https://www.sap-press.com/rheinwerk-computing/) [Visit Rheinwerk Computing Store](https://www.sap-press.com/rheinwerk-computing/)

### About

- [Home](https://sap-press.com/)
- [About Us](https://sap-press.com/the-publisher/)
- [Contact](mailto:info@rheinwerk-publishing.com)
- [Legal Notes](https://sap-press.com/legal-notes/)
- [Privacy Policy](https://sap-press.com/privacy/)
- [Terms of Use](https://sap-press.com/terms/)

© 2026 Rheinwerk Publishing, Inc. | Change Privacy Options

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Rheinwerk Computing",
    "url" : "https://blog.rheinwerk-computing.com/author/rheinwerk-computing"
  },
  "dateModified" : "2025-03-13T14:35:35.121Z",
  "datePublished" : "2023-06-09T13:00:00.000Z",
  "headline" : "Merge and Pull Requests in Git",
  "image" : [ "https://blog.rheinwerk-computing.com/hubfs/Merge%20and%20Pull%20Requests%20in%20Git.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://blog.rheinwerk-computing.com/merge-and-pull-requests-in-git",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://blog.rheinwerk-computing.com/hubfs/Logo-1.jpg"
    },
    "name" : "Rheinwerk Publishing, Inc."
  }
}
```