Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Viewing the commit logs

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 460
    Comment on it
    Previous Blogs


    1. Intialize git repostiory

    2. 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

      • Limit the number of commit
         git log -n 
        for example
        git log -n 1
        this will only show one commit
      •     commit a67edfaa870430ae58dd6d6e8cea68f0c9a08c0a
            Author: Naveen 
            Date:   Mon Dec 14 13:44:18 2015 +0530
        
            my initial commit
            
      • 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
        
      • commits by a certain Author
        git log --author="Naveen"
      • Global regular expression search
        git log --grep="my"

    Thanks

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: