title: Check if there are changes in git from pipeline
body: <p>I'm working on a multibranch (A) job that is being triggered from another one (B). I want to do the deploy of my project only if there are changes in this project (A). By changes I mean from the last build of this job (I've seen the jenkins pannel gives you this info when you build, so I thought it would be possible to read it somewhere).</p>
  
  <p><a href="https://i.stack.imgur.com/aJwJs.png" rel="noreferrer"><img src="https://i.stack.imgur.com/aJwJs.png" alt="enter image description here"></a>)</p>
  
  <p>So, is there any way of checking it in a pipeline?</p>