handling if the name of the branch is starting with origin/ for JGit implementation