I think there isn't one, simply because git allows forward slashes in branch names. Take a look at git-branch docs to see how the branchname is defined:
Further more, take a look at the git-check-ref-format docs to understand how can you restrict this, if need be (--allow-onelevel).
With all that in mind, I think git sees the branch name as a whole, including the slash, so it wouldn't need to provide any specific command to parse it, but you can always pipe the branch name to another tool that will filter it out. For example this SO answer addresses such case. You would probably have to use something like: value=${str#*/}.
dummyin the list you posted. The name of the second branch isfeature/dummy. Git cannot identify it if you use onlydummy. Try to rungit checkout dummyand it will fail.feature/dummydummy, notfeature/dummy. This is because I have further processing that will not work with the forward slashSonarQubewhich will automatically strip thefeature/part of the branchname. I'll then have some code to hit Sonar's API to get analysis result, I'll need to pass in the short branchname as a param. But yeah, I can trygrepor tokenize, I just want to know if there is a native git commandgit rev-parse --abbrev-ref HEAD | xargs basename?