Pull Request /PR (Create n Complete by Rebase and fast forward Merge) Git

CREATE A NEW PR (See Create PR)

  • Release featureeight has 7 commits
  • featurenine Branch has 7 commits
  • Create PR

 

 

Complete the PR - Using Rebase and fast-forward MERGE TYPE
Step 1: Complete your PR

  • in devOps > Go to that Merge
  • Use Case for Squash Merge
  • What Rebase and fast-forward do
    • It will take each commit in the pull request and cherry pick them onto the destination branch.
    • means it take all new commits from source branch and put those commits at top of destination branch commits
    • It will not create any new commit for you.
    • It will simply cherry pick those new commits and just simply place it on the top.
    • Rebase will have a linear graph
    • This strategy is used history straight and linear like it was in squash. But each commit is retained.
  • Complete merge by selecting (Rebase and fast-forward)
  • Result
    • both branch show same result
    • simply cherry pick 8th commit from source at the top of 9th list of commits
      • featureeight Branch- no PR
      • Featurenine Branch as one PR at top
  • Visibility in Source Branch (featureeight): Yes, the commits are inherently the same because the featureeight branch's HEAD is now the same commit as the featurenine branch's HEAD.
  • The featureeight branch's pointer also moves forward along with featurenine. Therefore, the commits that were previously only on featureeight are now the latest commits on both featureeight and featurenine. They are essentially the same commits.

 

 


Related Question