Fix last n commits to previous commit automatically
The error messages should go to standard error, rather than standard output:

  if [ -z "$no_of_commits" ]; then
    echo "You must provide a number of commits to fixup!" &gt;&amp;2
    return 1                                              ### HERE


I don't think there's a good case for returning distinct error codes for missing argument and invalid argument.  Are you ever going to make use of the different status values?