How to commit a change in git when git commit opens Nano?
That screen is just a text editor and those options at the bottom, represent commands, tipically its the ctrl
key + the letter for the command.
To make the commit you should write your commit message, then press ctrl+o
to write your message, and then ctrl+x
to exit that screen.
To avoid that screen you could do something like git commit -m 'your commit message'
, the -m
indicates that your commit message goes in the command.
The screen is just an editor and you can find help at the bottom of it.
To make the commit, you should write your commit message, then press ctrl+o
to write out your message, and then ctrl+x
to exit that screen. In case you are asked to rename the commit file press ctrl+c
to cancel or press enter
, then press the exit command
To avoid that screen, do git commit -m "your commit message"
In case you want to append changes to the last commit, do git commit --amend --no-edit