What Button to Continue Psat Commit Screen Ubuntu Terminal
321
New! Save questions or answers and organize your favorite content.
Learn more.
I'm new to git and learning from a PDF. I just executed a command $ git commit and it opens a new editor. But I'm trying to close that new commit editor. How to do this? I'm using git on windows.
asked Nov 5, 2012 at 19:55
aniskhan001aniskhan001
7,601 8 gold badges 36 silver badges 56 bronze badges
3
Save the file in the editor. If it's Emacs: CTRL X CTRL S to save then CTRL X CTRL C to quit or if it's vi: : w q
Press esc first to get out from editing. (in windows/vi)
answered Nov 5, 2012 at 19:57
tpg2114tpg2114
13.3k 6 gold badges 39 silver badges 56 bronze badges
9
Had troubles as well. On Linux I used Ctrl+X (and Y to confirm) and then I was back on the shell ready to pull/push.
On Windows GIT Bash Ctrl+X would do nothing and found out it works quite like vi/vim. Press i to enter inline insert mode. Type the description at the very top, press esc to exit insert mode, then type :x! (now the cursor is at the bottom) and hit enter to save and exit.
If typing :q! instead, will exit the editor without saving (and commit will be aborted)
answered Feb 5, 2015 at 11:59
Marc CompteMarc Compte
4,362 2 gold badges 15 silver badges 22 bronze badges
4
After writing commit message, just press Esc Button and then write :wq or :wq! and then Enter to close the unix file.
Pang
9,223 146 gold badges 85 silver badges 118 bronze badges
answered Nov 8, 2017 at 6:05
3
Better yet, configure the editor to something you are comfortable with (gedit as an example):
git config --global core.editor "gedit" You can read the current configuration like this:
git config core.editor You can also add the commit message from the command line.
git commit -m "blablabla" and the editor will not be opened in the first place.
answered Feb 5, 2015 at 12:06
Martin GMartin G
16.5k 9 gold badges 80 silver badges 93 bronze badges
0
After git commit command, you entered to the editor, so first hit i then start typing. After committing your message hit Ctrl + c then :wq
answered Apr 26, 2019 at 18:16
1
In Mac, Press shift+Z shift+Z (capital Z twice).
answered Apr 1, 2020 at 14:21
A_MoA_Mo
178 1 silver badge 8 bronze badges
Alternatives to Nano (might make your life easier):
On Windows, use notepad. In command prompt type:
git config core.editor notepad
On Ubuntu / Linux, use text editor (gedit). In terminal window type:
git config core.editor gedit
answered Feb 2, 2019 at 15:09
ggootzggootz
146 1 silver badge 7 bronze badges
I had this problem I received a ">" like prompt and I couldn't commit. I replace the " in the comment with ' and it works.
I hope this help someone!
answered Mar 22, 2018 at 22:10
1
You Just clicking the key.
first press ESC + enter and then press :x + enter
answered Dec 8, 2020 at 18:11
As an alternative to 'save & quit', you can use git-commit's function git-commit-commit, by default bound to C-c C-c. It will save the file and close it. Afterwards, you still have to close emacs with C-x C-c, as mentioned before. I am currently trying to find out how to make emacs quit automatically.
answered Jun 15, 2015 at 9:04
MartinMartin
158 1 silver badge 11 bronze badges
Not sure the key combination that gets you there to the > prompt but it is not a bash prompt that I know. I usually get it by accident. Ctrl+C (or D) gets me back to the $ prompt.
answered Feb 3, 2019 at 17:54
Note that if you're using Sublime as your commit editor, you need the -n -w flags, otherwise git keeps thinking your commit message is empty and aborting.
answered May 14, 2019 at 1:29
SiddharthaSiddhartha
4,171 6 gold badges 43 silver badges 63 bronze badges
I encountered the similar issue just in case this helps you.
When you hit the command git commit --amend. It opens a default editor. Now, the question was how to close this. I have just resolved this so here it is if it helps:
press Ctrl + X
Press Y to select Yes
Press Ctrl + M + A (This command saves the commit message you are editing and brings you out of editor)
Try git log command to verify your changes
buddemat
3,631 11 gold badges 21 silver badges 41 bronze badges
answered Nov 12, 2021 at 6:15
AlexMillerAlexMiller
53 1 silver badge 11 bronze badges
jaworskiincturban.blogspot.com
Source: https://stackoverflow.com/questions/13239368/git-how-to-close-commit-editor
0 Response to "What Button to Continue Psat Commit Screen Ubuntu Terminal"
Post a Comment