title: Jenkins fetching wrong branch when webhook triggers
body: <p>When gitlab <code>feature-0</code> has a commit and it triggers jenkins webhook, jenkins pulls from Main branch instead of <code>feature-0</code> branch. Vice versa if <code>main</code> branch has a commit, jenkins sometimes fetches from <code>feature-0</code> branch. How can I ensure it fetches the right branch when webhook triggers?</p>
  <pre><code>Fetching changes from the remote Git repository
  skipping resolution of commit remotes/origin/feature-0, since it originates from another repository
  Multiple candidate revisions
  Checking out Revision 1cda3cd8cb747c8588daaf07715499ea37927d8b (origin/main)
  Commit message: &quot;Please retry a full pipeline [ci build]&quot;
  </code></pre>
  <p>The above commit message is from <code>main</code> branch. <code>feature-0</code> branch has a different commit message and it triggered the jenkins job.</p>
  <p>I've specified main and feature in the branches section. But it isn't working as expected.</p>
  <p><a href="https://i.stack.imgur.com/hF16O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hF16O.png" alt="enter image description here" /></a></p>