title: Travis-ci: Watch and build a single branch from a Git remote repository
body: <p>I am actually envountering some issues with Travis-CI.
  Let's say that I have a repository on Github, with multiple branches.
  I just need to validate and build the <strong>master branch</strong>, and ignore any other branches.
  Looking at Travis docs, it seems I have to push a single <code>.travis.yml</code> file in every single branch of my repository. But should all these yml files have the same contents ?
  In other words, <a href="http://about.travis-ci.org/docs/user/build-configuration/#Specify-branches-to-build" rel="noreferrer">do I have to have this</a> at the top of each single travis.yml file in every branches:</p>
  <h1>In every single yml file</h1>
  <pre><code>branches:
    only:
      - master
  </code></pre>
  <p>In my yml file, I wish to run a script that runs specs tests, in the master branch, that validates the build with travis. Those specification tests are written in files that only exist in the master branch, not the others, as I don't need them there. So, I guess I'll also have to skip the script part in the yml file pushed in every branch different than the master ? As follows:</p>
  <pre><code>#YAML file (master branch)
  branches:
    only:
      - master
  
  # run the script
  script: &quot;tsc -f specs/*&quot;
  </code></pre>
  <p>In some other branch:</p>
  <pre><code>#YAML file (any other branch)
  branches:
    only:
      - master
  </code></pre>
  <p>Thanks reading.</p>