Thursday, 29 August 2019

How to check history of Git by Raj Gupta


Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git logs
git: 'logs' is not a git command. See 'git --help'.

The most similar command is
        log

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log
commit 805a6ac80a64923150a702334fc6260e3dad38ac (HEAD -> master)
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:29:28 2019 +0000

    Deleting new file

commit 2678aa7022d33d2d65f6a9c115ed02fea09ddcaa
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:27:50 2019 +0000

    test

commit e14411148b83b15aab594e9f6bd005b868718d8a
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:01:25 2019 +0000

    rename the file

commit 5e8e01d997b76ef16b68db043099f7a99c151dbe (origin/master, origin/HEAD)
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Fri Aug 23 11:27:00 2019 +0000

    Adding start test file

commit 977ca2dfcdb467fc73e69d8b18b9aafb39347d34
Author: rajkumargupta14 <37054671+rajkumargupta14@users.noreply.github.com>
Date:   Wed Jan 30 14:42:16 2019 +0530

    Initial commit

commit 34b2c4436021da9763d7eb891e76d5520ca444dd
Author: rajkumargupta14 <37054671+rajkumargupta14@users.noreply.github.com>
Date:   Fri Jan 25 15:37:24 2019 +0530

    updated file

commit 0425ad19e580b745d554a8f281fb5aadc5ebda55
Author: rajkumargupta14 <37054671+rajkumargupta14@users.noreply.github.com>
Date:   Mon Jan 14 20:07:27 2019 +0530

    update2

commit d8113f638d0b2aa813d93a7db3b3c28a3d2fe1e3
Author: root <root@ip-172-31-22-126.ap-southeast-1.compute.internal>
Date:   Tue Dec 25 06:47:49 2018 +0000

    new line added

commit a29c62b0253122f7e43e05d6af77af08c076f02c

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log --abbrev-commit
commit 805a6ac (HEAD -> master)
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:29:28 2019 +0000

    Deleting new file

commit 2678aa7
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:27:50 2019 +0000

    test

commit e144111
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:01:25 2019 +0000

    rename the file

commit 5e8e01d (origin/master, origin/HEAD)
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Fri Aug 23 11:27:00 2019 +0000

    Adding start test file

commit 977ca2d
Author: rajkumargupta14 <37054671+rajkumargupta14@users.noreply.github.com>
Date:   Wed Jan 30 14:42:16 2019 +0530

    Initial commit

commit 34b2c44
Author: rajkumargupta14 <37054671+rajkumargupta14@users.noreply.github.com>
Date:   Fri Jan 25 15:37:24 2019 +0530

    updated file

commit 0425ad1
Author: rajkumargupta14 <37054671+rajkumargupta14@users.noreply.github.com>
Date:   Mon Jan 14 20:07:27 2019 +0530

    update2

commit d8113f6
Author: root <root@ip-172-31-22-126.ap-southeast-1.compute.internal>
Date:   Tue Dec 25 06:47:49 2018 +0000

    new line added

commit a29c62b

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log --oneline --graph --decorate
* 805a6ac (HEAD -> master) Deleting new file
* 2678aa7 test
* e144111 rename the file
* 5e8e01d (origin/master, origin/HEAD) Adding start test file
* 977ca2d Initial commit
* 34b2c44 updated file
* 0425ad1 update2
* d8113f6 new line added
* a29c62b modified index.jsp
* a99e804 Update index.jsp
* 57a67c2 Update index.jsp
* e18726d Update index.jsp
* 4a487a7 promotions comment
* 3a90027 Update index.jsp
* f3ccb36 Update index.jsp
* ad497a6 Update index.jsp
* 521d0fd modified index.jsp
* 73e663e modified index.jsp file for docker demo
* 691a7a2 modified index.jsp file
* 3e3afd8 Update Dockerfile
* 740736a Update Dockerfile
* 22e01c8 added docker file
* 1aa6466 Update index.jsp
* 5c693b0 latest code updated
* 7c81f41 Update index.jsp
* 4762ccd ansible added
* 9066612 new update
* 8127737 updated coc name
* 037bd4f updated index file
* 8d8c0b6 updated index file
* 5e95a23 Update index.jsp
* a25d199 new update on index.html
* 438be18 Update README.md
* 3b7bdcd initial commit
* 2047f57 Create README.md

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log 805a6ac...e144111
commit 805a6ac80a64923150a702334fc6260e3dad38ac (HEAD -> master)
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:29:28 2019 +0000

    Deleting new file

commit 2678aa7022d33d2d65f6a9c115ed02fea09ddcaa
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:27:50 2019 +0000

    test

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log --since="3 days ago"
commit 805a6ac80a64923150a702334fc6260e3dad38ac (HEAD -> master)
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:29:28 2019 +0000

    Deleting new file

commit 2678aa7022d33d2d65f6a9c115ed02fea09ddcaa
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:27:50 2019 +0000

    test

commit e14411148b83b15aab594e9f6bd005b868718d8a
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:01:25 2019 +0000

    rename the file

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ ls
Dockerfile  pom.xml  README.md  server/  start2.txt  webapp/

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git log -- start2.txt
commit e14411148b83b15aab594e9f6bd005b868718d8a
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:01:25 2019 +0000

    rename the file

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$ git show 2678aa7022d33d2d65f6a9c115ed02fea09ddcaa
commit 2678aa7022d33d2d65f6a9c115ed02fea09ddcaa
Author: Raj Gupta <rajkumargupta14@gmail.com>
Date:   Thu Aug 29 08:27:50 2019 +0000

    test

diff --git a/raj90.txt b/raj90.txt
new file mode 100644
index 0000000..876c72e
--- /dev/null
+++ b/raj90.txt
@@ -0,0 +1 @@
+This is test file.

Administrator@EC2AMAZ-8EUJ4RB MINGW64 ~/projects/hello-world (master)
$

No comments:

Post a Comment