I have encountered this several times where if you try and change a job name along with any configuration for a job Git will get into a bad state and the SCM will start throwing up errors like:
The only thing I have found is to fix this is to follow the following steps:
You will have to have admin rights and the ability to restart your jenkins.
- recreate the OLD_JOB_NAME
- change the system configuration scm sync to none.
- restart the jenkins. via your_jenkins_server/restart
- change the system configuration scm sync to git.
- Ensure that the configuration is now syncing correctly and you do not have any more errors.
- delete OLD_JOB_NAME again.
- If this still does not work you can try downgrading the plugin and repeating the steps again.
You may lose all your job configurations after you reenable the SCM sync so you will have to make a small change to each job name such as changing the description by a single letter.