0

Typing in 'git commit -m (then a message is ok), my question is that once i commit or merge, git pulls up a screen... here's the merge/commit screen that comes up now once I have typed a message(in yellow) i cannot get any actions... I've pressed enter, I've consulted the menu, I've read the GitBook, and I cannot get passed this screen...can you please tell me how to actually submit this screen. How to enter this data, or accept it or whatever git needs to do to enter this data. Once I have typed my message(in yellow), pressing enter does nothing... Please assist...

DennisWPaulsenJR
  • 465
  • 1
  • 5
  • 16
  • 1
    Looks like you are using windows. Run `git config --global core.editor ''` to setup an editor that you are familiar with and has been installed in your machine. The path is its installed full path like `C:\Program Files\sublimetext\sublime.exe` – ElpieKay Aug 16 '16 at 05:33
  • yes sir, I am using sublime text 3. My issue at this point is when i merge (as shown above), or when I commit, git brings up this screen. Once I am on this screen,what must I do to submit this data. It is asking me to type a message (in yellow) and once I do that, how do I save it ? – DennisWPaulsenJR Aug 16 '16 at 16:06

4 Answers4

6

The GIT Bash brings up a VI editor to confirm the commit message, which in your case is a Merge.

To save and quit:

  1. Hit the ESC key
  2. Type :wq (write & quit)

There are many helpful VI cheat sheets out there if you'd like to learn more: VI Cheat Sheet

Jeff Puckett
  • 37,464
  • 17
  • 118
  • 167
Daniel
  • 106
  • 3
1

This is the editor screen, to exit it try pressing escape key first (ESC) and then :wq! to save and exit the screen.

Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88
cafebabe1991
  • 4,928
  • 2
  • 34
  • 42
  • Hey, this also answered my question...ty. Although it was the same as the answer given by daniel, i did try to check it for an answer but stack will onl let my check one answer...thanks though – DennisWPaulsenJR Aug 16 '16 at 16:11
1

Try hitting Esc and then :wq For future reference, see this detailed answer on exiting the vi editor.

Community
  • 1
  • 1
Dave M
  • 1,302
  • 1
  • 16
  • 28
0

Thanks to all those who contributed to the answer. It seems that three of these answers were identical, and each were correct. The right way to complete the commit from the screenshot posted above is to type out the commit message (seen in yellow), which does have a character limit. Then, by pressing 'esc', git opens a command line at the bottom of this screen. At this time, by typing ':wq', git then writes the commit and quits the screen, returning to the regular command line. Thanks to Daniel Souza and Jeff Puckett II for coming up with the first right answer that I have received on Stack. If you will please look at my question on how to set up a default text editor (sublime text 3), I would be most greatfull. It's not your standard question...ty

DennisWPaulsenJR
  • 465
  • 1
  • 5
  • 16