title: Function in bash to commit and push in one command
body: <p>I try to commit and push in one command, typing something like:</p>
  
  <p><code>gm "This is my commit message"</code></p>
  
  <p>Which would run: </p>
  
  <p><code>git commit -am "This is my commit message" &amp;&amp; git push</code></p>
  
  <p>I've tried this function in my <code>.bashrc</code>:</p>
  
  <pre><code>function gm() {
       git commit -am $1 &amp;&amp; git push
  }
  </code></pre>
  
  <p>Which works, except for the fact that I can not type several words as commit message. I can run </p>
  
  <p><code>gm My_Message</code></p>
  
  <p>and it works fine, but if  I type several words, like</p>
  
  <p><code>gm This is my message</code></p>
  
  <p>It will only run <code>git commit -am "This" &amp;&amp; git push</code>. I tried using quotation marks but it returns an error. How should I configure this function to work?</p>