title: Git alias with multiple commands and arguments
body: <p>I am trying to create a global git alias to delete a local and a remote copy of a branch in one command. I would like the alias to take the following input:</p>
  
  <pre><code>$ git purge myBranch
  </code></pre>
  
  <p>And generate the following commands:</p>
  
  <pre><code>$ git branch -d myBranch
  $ git push origin --delete myBranch
  </code></pre>
  
  <p>Among many other attempts, I've tried this:</p>
  
  <pre><code>$ git config alias.purge '!sh "git branch -d $1; git push origin --delete $1"'
  </code></pre>
  
  <p>But I get this error:</p>
  
  <pre><code>sh: 0: Can't open git branch -d myBranch; git push origin --delete myBranch
  fatal: While expanding alias 'purge': 'sh "git branch -d $1; git push origin --delete $1"': No such file or directory
  </code></pre>
  
  <p>How can I create a global git alias that accepts an argument and forwards it to two separate git commands in this fashion?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Per @Chris' suggestion I've tried out the following:</p>
  
  <pre><code>git config --global alias.purge '!git branch -d $1 &amp;&amp; git push origin --delete $1'
  </code></pre>
  
  <p>Here is the result:</p>
  
  <pre><code>$ git purge test
  warning: deleting branch 'test' that has been merged to
           'refs/remotes/origin/test', but not yet merged to HEAD.
  Deleted branch test (was 1316434).
  error: dst ref refs/heads/test receives from more than one src.
  error: failed to push some refs to 'git@github.com:testrepo/repo.git'
  </code></pre>
  
  <p>I've confirmed that this works properly if I run the commands directly:</p>
  
  <pre><code>$ git branch -d test &amp;&amp; git push origin --delete test
  warning: deleting branch 'test' that has been merged to
           'refs/remotes/origin/test', but not yet merged to HEAD.
  Deleted branch test (was b610eca).
  To git@github.com:testrepo/repo.git
   - [deleted]         test
  </code></pre>