[JENKINS-22284] Improve branch creation

- Improve repository layout detection
- Enable custom branch location
- Enable tag creation