Previous Blogs
Intialize git repostiory
First Commit
Now viewing our past commit logs we do with git log, and this will show us the log of commits that have taken place till now.
naveen@naveen:/var/www/html/RND/symfony_sites/symfony_todoapp$ git log
Git will display following messages
commit a67edfaa870430ae58dd6d6e8cea68f0c9a08c0a [we've got the commit ID, this is the identifier, each commit has a unique ID]
Author: Naveen [Author of the commit, this is fetched out from the congfig under the .git folder]
Date: Mon Dec 14 13:44:18 2015 +0530 [Date when the commit was made]
my initial commit message we put while commit, commit messages must be very descriptive, so that other team member must know what changes you have made
Some usefull options we can use with commit log
naveen@naveen:/var/www/html/RND/symfony_sites/symfony_todoapp$ git help log
This will display all the availbale option we can use with git log
- Time Period the commit took place
git log --since
for example git log -since= 1
this will commit took place from provided date
naveen@naveen:/var/www/html/RND/symfony_sites/symfony_todoapp$ git log --since=2015-12-10
commit a67edfaa870430ae58dd6d6e8cea68f0c9a08c0a
Author: Naveen
Date: Mon Dec 14 13:44:18 2015 +0530
my initial commit
- Like --since we can also use --until, Everything leading up until the 2015-12-10 shows up.
naveen@naveen:/var/www/html/RND/symfony_sites/symfony_todoapp$ git log -- until=2015-12-10
its shows nothing but when we do naveen@naveen:/var/www/html/RND/symfony_sites/symfony_todoapp$ git log --until=2015-12-15
- it shows up with
commit a67edfaa870430ae58dd6d6e8cea68f0c9a08c0a
Author: Naveen
Date: Mon Dec 14 13:44:18 2015 +0530
my initial commit
- Global regular expression search
git log --grep="my"
Thanks
0 Comment(s)