Tuesday, December 16, 2014

Git Commit with Header and Multi-line Body

I found this interesting answer on Stackoverflow to add Git Commit with Header and Multi-line Body and I wanted to share it.


 git commit -m "Header Comes Here" -m "Multiline body Comes Here.   
 Add a title to your commit after -m enclosed in quotes, 
 then add the body of your comment after a second -m.  
 Press ENTER before closing the quotes to add a line break.  
 Repeat as needed.  
 Then close the quotes and hit ENTER twice to apply the commit."  

Thanks Jon Crowell