Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add multiline commit when using rebase in git

Tags:

git

I want to change my single line commits to multiline commits adding more details. I tried using git rebase -i which opens up a file in nano where I can reword my commits. However, adding multiple line commits there doesn't work.

like image 686
Satwik Avatar asked Sep 01 '26 14:09

Satwik


1 Answers

Editing the commit message in the file with the list of commits does not do anything anyway, the commit messages are only there to identify the commits by more than the SHA.

If you selected the reword stanza for a commit and continue, then when the commit in question is applied, your commit editor (nano in your case) opens with the commit message just like when you commit normally and you can put any commit message in there.

like image 120
Vampire Avatar answered Sep 03 '26 15:09

Vampire



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!