Вы можете запустить:
git log <SHA1>..HEAD --ancestry-path --merges
Из комментария последнего фиксации на выходе вы можете найти имя оригинальной ветки
Пример:
c---e---g--- feature
/ \
-a---b---d---f---h---j--- master
git log e..master --ancestry-path --merges
commit h
Merge: g f
Author: Eugen Konkov <>
Date: Sat Oct 1 00:54:18 2016 +0300
Merge branch 'feature' into master
Sub CutPaste()
Const cSheet As Variant = "Sheet1" ' Worksheet Name/Index
Const cFirstS As Variant = "E" ' Source First Column Letter/Number
Const cLastS As Variant = "O" ' Source Last Column Letter/Number
Const cFirstT As Variant = "D" ' Target First Column Letter/Number
Const cFirstRow As Long = 1 ' First Row Number
Const cCriteria As Variant = "B" ' Criteria Column Letter/Number
Const cStrCriteria As String = "Plan" ' Criteria String
Dim lastRow As Long ' Last Row Number
Dim i As Long ' Row Counter
With ThisWorkbook.Worksheets(cSheet)
lastRow = .Cells(.Rows.Count, cFirstS).End(xlUp).Row
For i = cFirstRow To lastRow
If .Cells(i, cCriteria) = cStrCriteria Then
.Range(.Cells(i, cFirstS), .Cells(i, cLastS)).Cut _
Destination:=.Cells(i, cFirstT)
End If
Next
End With
End Sub
Sub CopyClearContents()
Const cSheet As Variant = "Sheet1" ' Worksheet Name/Index
Const cFirstS As Variant = "E" ' Source First Column Letter/Number
Const cLastS As Variant = "O" ' Source Last Column Letter/Number
Const cFirstT As Variant = "D" ' Target First Column Letter/Number
Const cFirstRow As Long = 1 ' First Row Number
Const cCriteria As Variant = "B" ' Criteria Column Letter/Number
Const cStrCriteria As String = "Plan" ' Criteria String
Dim lastRow As Long ' Last Row Number
Dim i As Long ' Row Counter
With ThisWorkbook.Worksheets(cSheet)
lastRow = .Cells(.Rows.Count, cFirstS).End(xlUp).Row
For i = cFirstRow To lastRow
If .Cells(i, cCriteria) = cStrCriteria Then
.Range(.Cells(i, cFirstS), .Cells(i, cLastS)).Copy _
Destination:=.Cells(i, cFirstT)
.Cells(i, cLastS).ClearContents
End If
Next
End With
End Sub