In git how to find the name of the branch from which my actual branch created? Example: I created my development branch(dev-feature) from integration branch(dev-int). How to trace the integration from feature branch?
You can't.
You branch off from a commit , not from a branch. Branch is just a temporary tag that moves with commits while active.
Say there's a commit 0123456 where you have branch A and B. You make branch C. Which branch did you branch off of? The real answer is "neither" - you branched off from 0123456.
Also, branches don't remember where they started; the only thing you can do is trace the history back, and find where that history attached to the history of another branch. For example, to see where exactly def-feature
history meets dev-int
history,
git merge-base def-feature dev-int
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.