I have a Jenkins Pipeline job which is configured to checkout a git repo and a specific local branch.
How can i get the name of the local branch in my Jenkinsfile?<
You can use scm attributes to get the list of branches configured for your scm :
scm
// List of all configured branches def allBranches = scm.branches // Only the first configured branch name def gitBranch = scm.branches[0].name