Blog / Git
Git Pull Request for Specific Commits
  • Sep 10, 2022
  • 94
  • 62

Using cherry-pick to select specific commits for your Pull Request.

1. Create a new branch based on the target of the Pull Request

git branch cherry-branch origin/master

2. Switch to a new branch

git checkout cherry-branch

3. Verify if you are in the new branch

git branch

4. Cherry-pick

Use git cherry-pick to pick up the commits into the new branch which is the branch that you are in now

Note: COMMIT-ID can be found in that commit page in Azure DevOps or GitHub. Copy the ID and paste it here:

git cherry-pick COMMIT-ID

5. Resolve Conflicts

If there is any conflict, resolve and merge all differences in VS Code or Visual Studio.

6. Continue to use cherry-pick if more commits are needed

git cherry-pick --continue
:wq
git cherry-pick COMMIT-ID

7. Push the new branch

git push origin cherry-branch

8. Create a Pull Request

You can now create a Pull Request from the new branch to the target branch. It will only pick up the commits your selected previously.

Read more in this series:

  • Git:
    1. You are reading: Git Pull Request for Specific Commits

If you have a Website or a Web API developed by using .Net Core and looking for a way to publish your applications, this post will explain how to do it using GoDaddy Windows Hosting.Note: at this mome ...

Search text in Stored Procedure in SQL SELECT DISTINCT o.name AS Object_Name, o.type_desc FROM sys.sql_modules m INNER JOIN sys.objects o ON m.object_id = o ...

After deployment Angular and API on IIS, it's working fine unless I refresh the page. Once refreshed, the web encountered 404 error. In this article, I will explain how to resolve this.Since Angular i ...

There are some benefits of keeping both UI and API parts in the same place for small projects. In this article, I will explain how I did to deploy Angular Web and ASP .Net Core API in the same folder ...

I got CORS error after publishing my API and Angular app to IIS even though CORS is enabled and the origins of the Angular app is added. Below is how I resolved this issue.Just simple, make sure you s ...

In Object-Oriented Programming, S.O.L.I.D refers to the first five design principle for the purpose of making software designs more understandable, flexible, and maintainable. The principles was first ...

1. The Situation:Error Message: Pulse Secure Application failed to load Java. Please install correct JRE version.Description: This issue happens when I'm using a M1 Mac with a correct version of ...

Accelerated Mobile Pages (AMP) focuses on delivering static content from publishers as quickly as possible and possibly rewards early adopters with a boost in rank. Let's see how to implement it ...

Below is how to decrypt/convert a Hex string value into text using VB.Net:Decrypting Hex string value to string in VB.Net Function HexToString(ByVal hex As String) As String Dim text As New Sy ...