News for hackers. Stuff that matters.
Re:A Git catastrophe cleaned up by stevelosh on Wednesday December 21, 2016 @12:50PM (#13231050)

    ┌─────┐◀──────── master
    │Merge│◀──────── bugfix
    └▲───▲┘
     │   │
     │   │
     │  ┌─┐
     │  │B│
     │  └▲┘
    ┌─┐  │
    │A│  │
    └▲┘  │
     └───┤
         │
    ┌────────┐
    │Ancestor│
    └────────┘
Which branch was commit `B` made on? What did the `bugfix` branch look like one commit ago?
Re:A Git catastrophe cleaned up by grzm on Wednesday December 21, 2016 @01:09PM (#13231227)
Nice use of Unicode! Do you have a tool to help you construct a diagram like this?
Re:A Git catastrophe cleaned up by sampo on Wednesday December 21, 2016 @01:29PM (#13231407)
If you were in master when you merged bugfix in ("git merge bugfix"), then you can

  git cat-file -p master
and see which commit, A or B, is listed as the first parent. This belongs to the master.
Re:A Git catastrophe cleaned up by justinlaster on Wednesday December 21, 2016 @02:02PM (#13231677)
> Which branch was commit `B` made on

You can do some basic heuristics to figure it out, but I'm not sure what the point of knowing this is.

>What did the `bugfix` branch look like one commit ago?

`git checkout bugfix; git log bugfix^1`