Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8041409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:12:35+00:00 2026-06-05T04:12:35+00:00

For each defect in code I create separate branch. When defect is fixed I

  • 0

For each defect in code I create separate branch. When defect is fixed I merge this branch in master, so I have history like illustrated below (we see two branches with fixes):

          defect1 fix         defect2 fix
         a---b---c---d           e---f
        /             \         /     \
---o---1---x---y---z---2---o---3---w---4---o--- 

The question is how to get diff for fix1 (between branch start (1) and branch end (2)) or fix2 (diff between (3) and (4)) at any point of time (e.g. for any closed defect in past).

Update: actual question is how to figure out SHA summs of a and d or e and f to perform next obvious diff command diff <commit> <commit>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:12:38+00:00Added an answer on June 5, 2026 at 4:12 am

    The answer is simple:

    git diff 1..d
    

    This shows the differences between the branching point of your defect1 fix branch (i.e. 1) and it’s end (i.e. d).

    In order to find the start of the defect1 fix branch, use

    git merge-base master defect1-fix-branch
    

    as indicated in this answer: https://stackoverflow.com/a/2458173/520162.
    This gives you 1 according to the documentation of git merge-base.

    The end of the defect1 fix branch is simply identified by it’s name. So, finding all differences introduced in defect1 fix, you need to do

    git diff 1..defect1-fix-branch
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Below I wrote a piece of code to answer this question. Colud you please
I appear to have a memory leak in this piece of code. It is
I have written this code for a dynamic layout where I am using this
Each book can have many authors. And each author can author many books. class
Each Lucene doc is a recipe, and each of these recipes have ingredients. Im
Each restaurant has restaurant branches, each branch must determine which days of the week
Fairly common question this, to which I have a few answers and I'm nearly
In a .net project, create two forms {Form1, Form2} and on each form create
I'm using this code (taken from here ) in ApplicationController to detect iPhone, iPod
I took this code as example to write a service. And I made some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.