I have recently started using the command line and this made me chuckle especially there 'where am i' and was extremely informative as well.
I've come across a problem I've yet to be able to fix, I wonder if you might have a solution.
When you're working with git and you're about to commit and type out a message but you forget one side of the "" around the message - my terminal goes wild and I haven't been able to figure out what to do except close and start again which is annoying.
Let's say I type git commit -m "initial commit
and press enter without closing the quotation mark I get just get
and nothing I press works, is there are cmd to fix it?
Hi Mikey, I know exactly what you're talking about and I have made the mistake of forgetting my ending quotation mark many times!
I agree with KamilZag, CRTL + C will allow you to return to the normal command line and get out of that weirdness.
I also just saw Aschwin's great explanation, yes, if you notice your error soon enough, I have found that I can add the ending " even if I've pressed enter. However, I did not know I could update my commit message, so thank you for that!
I've done it a few times and then I just end up staring blankly at the screen like 'WTF do I do' hit a few keys then close the terminal, but then I have to navigate all the way back to where I was because I don't know any other way. I contemplated Googling it but couldn't think of what to ask without writing an essay.
Most of the time you can just add the closing quotation mark. It might include the tailing carriage return/linefeed (\n) into the commit message, but that's not that much damage done right? You can also update the commit message, which I hardly do so I don't know how to do it without looking it up for you.
I have recently started using the command line and this made me chuckle especially there 'where am i' and was extremely informative as well.
I've come across a problem I've yet to be able to fix, I wonder if you might have a solution.
When you're working with git and you're about to commit and type out a message but you forget one side of the "" around the message - my terminal goes wild and I haven't been able to figure out what to do except close and start again which is annoying.
Let's say I type git commit -m "initial commit
and press enter without closing the quotation mark I get just get
Have you tried
Ctrl + c
?
It should help i think
Hi Mikey, I know exactly what you're talking about and I have made the mistake of forgetting my ending quotation mark many times!
I agree with KamilZag, CRTL + C will allow you to return to the normal command line and get out of that weirdness.
I also just saw Aschwin's great explanation, yes, if you notice your error soon enough, I have found that I can add the ending " even if I've pressed enter. However, I did not know I could update my commit message, so thank you for that!
Thank you all so much for your help.
I've done it a few times and then I just end up staring blankly at the screen like 'WTF do I do' hit a few keys then close the terminal, but then I have to navigate all the way back to where I was because I don't know any other way. I contemplated Googling it but couldn't think of what to ask without writing an essay.
I appreciate the help! :)
Most of the time you can just add the closing quotation mark. It might include the tailing carriage return/linefeed (\n) into the commit message, but that's not that much damage done right? You can also update the commit message, which I hardly do so I don't know how to do it without looking it up for you.
You can edit your last commit message with
git commit --amend