title: How to recover when stuck by executing wrong shell commands?
body: <p>I'm using Git Bash 2.9.0-64-bit in win7 64bit.
  Here is my shell code </p>
  
  <pre><code>function sum1_x(){
  a=$1
  while [ $a -ge 1 ]; do
      sum=$[$sum + $a]
      a=$[$a - 1]
  done
  
  echo $sum
  }
  
  sum $1
  </code></pre>
  
  <p>In Git Bash,my type history is as follows:  </p>
  
  <blockquote>
    <p>wen@PC-WEN MINGW64 /d/git/ (dev)<br>
    $sh sum1_x.sh<br>
    exit<br>
    :q  </p>
    
    <p>quit<br>
    quit()<br>
    exit()</p>
  </blockquote>
  
  <p>After I typed <code>sh sum1_x.sh</code>,I can no longer execute any shell command.I tried many commands as shows.I know there are bugs in my script,but how can I get back to execute shell script facing this kind of problems? Nothing can I do now.</p>