I just created an HTML file that has 9 lines on my repository and I used "git commit -m" command but git said, "1 file changed, 0 insertions(+), 0 deletions(-)".
I expected the output of "1 file changed, 9 insertions(+), 0 deletions(-)" because I created a file that has 9 lines.
If you don't want to use git add
and git commit
two commands then you can use this (for existing files)
git commit -a -m 'your commit message'
As per git documentation, Adding the -a option to the git commit command makes Git automatically stage every file that is already tracked before doing the commit, letting you skip the git add part.
For new files, you will need to explicitly add it using git add