title: bash, script to git add one file and commit
body: <p>I'm trying to create a script to do this:</p>
  <pre><code>git add &quot;file&quot;
  git commit -m &quot;Comment&quot;
  </code></pre>
  <p>My idea is to run:</p>
  <pre><code>gac &quot;file&quot; &quot;Comment&quot;
  </code></pre>
  <p>I know I can do something similar but for all files, with:</p>
  <pre><code>echo 'alias gac=&quot;/path/to/gitaddcommit.sh&quot;' &gt;&gt; ~/.bash_profile
  </code></pre>
  <p>And the <code>.sh</code> would be:</p>
  <pre><code>!/bin/bash
  git add .
  echo “Enter commit message: “
  git commit -am “$commitMessage”
  </code></pre>