PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, October 6, 2022

[FIXED] How do I exit my git commit message? I'm NOT in the VIM, I used the " commit -m " command

 October 06, 2022     bash, git, github, terminal     No comments   

Issue

I was trying to commit a message and I accidentally made a typo:

'git commit -m 'Deleted old Basic Syntax chapter README'

Now i'm stuck in the terminal, and all it shows is:

> 
>
>
>
>asdfasdfad
>
>asd
>

How do I exit out of this, but still keep my commit message? I'm fine with having to re-commit, but I dont want to have to exit the terminal because I'm sitting on a few commits that I don't want to lose. (If i'll lose them at all?)


Solution

You won't lose commits by closing the terminal.

ctrl+c will exit the prompt >

What happened was you opened up a string with the odd number of ' characters.
Bash expects more input for your string, and allows you to enter it after the > prompt.

Try typing ' and hit return, you will get the same thing. If you close the string by typing '`' again, you will be back to your normal bash prompt.



Answered By - Travis
Answer Checked By - Clifford M. (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing