Mac Terminal Commands – how to come back after forgetting to close quotation marks

Warning: Noob question ahead!

I’m using Heroku, and have forgetting to close the quotation marks when committing:

  • Python script causes git publickey error when not run in IDLE
  • How is SVN v 1.8 branching / merging compared to Git?
  • How do I make git post-receive emails be sent from the commit author?
  • .htaccess is ignored when using ScriptAliasMatch
  • TortoiseGit filter for 2 user names
  • Why isn't 'eval' recognized in ssh RoR?
  • localhost: app myMac$ git commit -m "testing

    As you can see the last " is missing on the end of testing. Now I’ve got the > sign and I’m unsure how to get out of it? This must be a trivial thing but I just can’t get a grip of it!

  • Explicit and safe git pull in Intellij IDEA
  • Calculating total lines added/deleted after a merge?
  • Remove previous commit from git while keeping latest changes?
  • Git changelist's
  • Commit SVN working copy into Git repository
  • How to get only the git date format as YYYY/MM/DD?
  • 3 Solutions collect form web for “Mac Terminal Commands – how to come back after forgetting to close quotation marks”

    This is more of a bash question than a git one.

    For a forgotten quotation mark, see this answer on

    Basically, press ctrl-c to cancel the current command, then the up arrow to retrieve your last line typed.

    localhost: app myMac$ git commit -m "testing

    Whoops, hit ctrl-c.

    localhost: app myMac$

    Now press the up arrow

    localhost: app myMac$ git commit -m "testing

    and try again.

    Just add " and press enter. If you want to fix the commit message to remove the new line run:

    git commit --amend -m "Replacement commit"

    This will change the last commit message to the new one.

    Your shell knows there is a missing ". You can continue typing your message and finally enter the last " and it should take.

    And if this fails there is always git commit --amend option to correct what went wrong.

    Git Baby is a git and github fan, let's start git clone.