An alias that will generate a git commit message staged changes as shown in git-status. Put this alias (section below) in your .gitconfig
.
The message generated will be in the format of:
$ git status --porcelain
A file1.py
A file2.py
A file3.py
M file4.py
M file5.py
D README.md
R test.txt-> test2.txt
$ git commit-status
$ git log --no-decorate -n 1
bee4f8e Added: file1.py file2.py file3.py Modified: file4.py file5.py Deleted: README.md Renamed: test.txt-> test2.txt
Shared on Stack Overflow.
That is a good question! I've used this alias daily for soon 2 months without seeing this happening. Does it always happen? Is there only one file modified in the staged area, or what is the minimal setup for reproducing this? What OS/toolchain are you using?
Try the updated version above!
It's because each change got it's own line. I updated the alias with the version that I'm acutally using myself which puts everything on one line. Test the updated version!