In short, I want to know the latest commit ID that can also be found on origin
.
It is possible for me to make many branches, creating a tree from a particular commit ID, but all branches derive from that one commit ID which is also found on origin
.
git merge-base
asks for two branches. Getting the current branch name is no problem (HEAD), but I do not know the how to get the name of the remote branch. Not just any remote branch, but the one that current branch has derived from most recently. Is this possible, or do I need to go for another approach? Any hint on what I can do?