title: Get list of git repo branch names
body: <p>How do I get a list of branch names from a git repository in a shell script?</p>
  <p>e.g. If my repo has the following branches:</p>
  <pre><code>master, dev, test, feature/new-feature
  </code></pre>
  <p>I want to store these in a list that can be accessed to check if a a certain branch name exists already. I then can use this command(s) in a script for use in a Jenkinsfile</p>
  <p>Thanks</p>