# New Jenkins instance building old commits

**URL:** <https://community.jenkins.io/t/new-jenkins-instance-building-old-commits/3259>\
**Category:** Using Jenkins\
**Created:** [August 4, 2022, 9:01am UTC](https://community.jenkins.io/t/new-jenkins-instance-building-old-commits/3259 "2022-08-04T09:01:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rippie](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/rippie/32/1982_2.png) [@rippie](https://community.jenkins.io/u/rippie)\
**Post date:** [August 4, 2022, 9:01am UTC](https://community.jenkins.io/t/new-jenkins-instance-building-old-commits/3259/1 "2022-08-04T09:01:40Z")

</div>

I have a few freestyle jobs that have been migrated to a fresh Jenkins instance with Ansible. It created a job named after the old one and copied the config.xml file.  
The jobs have two types of branch specifiers:

- \*\*  
or
- :^(?!._^(master|origin/master)$)._$

The problem is that the migrated jobs that start from #1 try to build the very first commits that have been pushed into the repo (and there are 10-20k commits)

Also, the weird thing is that when I set the branch specifier to \*/master it only builds newest commits from the master branch.

How do I make Jenkins build only the newest commits from these other branches?

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [August 8, 2022, 7:22am UTC](https://community.jenkins.io/t/new-jenkins-instance-building-old-commits/3259/2 "2022-08-08T07:22:06Z")

</div>

Hello @rippie and welcome to this community 👋

Is your SCM GitHub? Did you declare your jobs as a GitHub project?  
What are the build triggers?  
Do you have a webhook your projects responds to?  
Thanks.

---

<div class="post-metadata">

**Author:** ![rippie](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/rippie/32/1982_2.png) [@rippie](https://community.jenkins.io/u/rippie)\
**Post date:** [August 8, 2022, 7:25am UTC](https://community.jenkins.io/t/new-jenkins-instance-building-old-commits/3259/3 "2022-08-08T07:25:08Z")

</div>

The SCM is GitHub and builds are triggered by webhooks

---

<div class="post-metadata">

**Author:** ![poddingue](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/poddingue/32/985_2.png) [@poddingue](https://community.jenkins.io/u/poddingue)\
**Post date:** [August 9, 2022, 8:22am UTC](https://community.jenkins.io/t/new-jenkins-instance-building-old-commits/3259/4 "2022-08-09T08:22:53Z")

</div>

How does the webhook page look on GitHub?  
Can you see tons of of webhooks there?
