Answer the question
In order to leave comments, you need to log in
How to find the branch from which the changes came?
Hello.
In the process of using git, I discovered a frequent case that prevents me from living.
There is a certain main branch (master), into which merge is periodically made from other (feature) branches.
How to look at a line in a file in the main branch to understand from which branch it was merged?
I tried git blame, but it says about the author. And I want to see not the author, but the branch in which each individual line was added. Well, or changed.
What is the easiest way to get results?
Answer the question
In order to leave comments, you need to log in
git log <Commit hash>..HEAD --ancestry-path --merges --oneline --color | tail -n 1
Bear-MacBook-Pro:MyApp ManWithBear$ git log c1c750c..HEAD --ancestry-path --merges --oneline --color | tail -n 1
8ec0203 Merge branch '9-filter-ui-implementation' into 'master'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question