From Powershell I've called git commit
and it presents me with
I typed the commit message (in yellow) but I have no idea what to do next. Pressing Enter just adds a newline to my input. How do I complete the commit? I've been through several tutorials but none of them explained the next step.
EDIT: So I found I can press :
to make the cursor jump to the bottom line, then type wq
to complete the commit. What exactly is this? Is it correct? Are there any alternatives?
Typing :wq and pressing enter should do it, i.e. save the commit message and exit. : enters the command mode, w is for "write" (save) and q is for "quit". You may need to hit escape before :wq to exit the insert mode ( vi is a mode based editor). If you want to exit without saving hit escape, :q! and enter.
git exit commit message After writing commit message, just press Esc Button and then write :wq or :wq! and then Enter to close the unix file.
If you want to save your changes and quit, press Esc then type :wq and hit Enter or ↵ or on Macs, Return . Git (2.28+) allows configuration of the name of the branch created when you initialize any new repository.
After typing the message, press Escape to exit insert mode and then type :wq (write/save and quit, or :q! if you want to cancel and return to the prompt). Alternatively, you can commit in one step by typing git commit -m "message"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With