Wednesday, 17 July 2019

git log --stat: Get more information on commits


'git log --stat' return how many insertion and deletions are happened in a file.

$git log --stat
commit 62f16b21c4c1fced843bf4fc8f2a096c1096ad15 (HEAD -> master, origin/master, origin/HEAD)
Author: krishna <krishna@abcd.com>
Date:   Wed Jun 26 09:36:02 2019 +0530

    Update welcome.txt

 welcome.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

commit deb0c7cd4840bab7290c7224cae6ff2de3eadc2e
Author: krishna <krishna@abcd.com>
Date:   Wed Jun 26 09:31:06 2019 +0530

    Updated welcome.txt file

 welcome.txt | 1 +
 1 file changed, 1 insertion(+)
    Update welcome.txt


You can even combine multiple options.

$git log --pretty=oneline --stat
62f16b21c4c1fced843bf4fc8f2a096c1096ad15 (HEAD -> master, origin/master, origin/HEAD) Update welcome.txt
 welcome.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
deb0c7cd4840bab7290c7224cae6ff2de3eadc2e Updated welcome.txt file
 welcome.txt | 1 +
 1 file changed, 1 insertion(+)



Previous                                                    Next                                                    Home

No comments:

Post a Comment