title: How to configure Git post commit hook
body: <p>How to trigger a build remotely from Jenkins?<br>
  How to configure Git post commit hook?</p>
  
  <p>My requirement is whenever changes are made in the Git repository for a particular project it will automatically start Jenkins build for that project.  </p>
  
  <p>In Jenkins trigger build section I selected trigger build remotely.<br>
  In <code>.git</code> directory, hooks directory is there in that we have to configure post commit file.<br>
  I am confusing how to trigger a build from there (I know some part we should use curl command).</p>
  
  <hr>
  
  <pre><code>curl cmbuild.aln.com/jenkins/view/project name/job/myproject/buildwithparameters?Branch=feat-con
  </code></pre>
  
  <p>I have placed this command in my git server hooks directory (post commit hook).<br>
  Whenever the changes happen in repository it is running automate build.  </p>
  
  <p>I want to check in changeset whether in at least one java file is there the build should start.<br>
  Suppose the developers changed only xml files or property files the build should not start.<br>
  Along with <code>xml</code>, suppose the <code>.java</code> files is there the build should start.  </p>