Git branch parent
When asked to update a PR I had made a while back, I couldn\’t remember if I had based the PR on the
master branch or the
develop branch for the next major version. I\’d usually go with
git branch --merged; since there had been commits made to both branches, this didn\’t work as they both would have shown up as not merged.
git show-branch \ | sed "s/].*//" \ | grep "\*" \ | grep -v "$(git rev-parse --abbrev-ref HEAD)" \ | head -n1 \ | sed "s/^.*\[//"
These five "life-changing git aliases" didn\’t answer the question I had, but it\’s a valuable git alias collection nonetheless.