Skip to content

Tip of the day: partial git log

December 3, 2010

This entry is a short one. Do you have a large project and are curious about the changes done in a subfolder only, or perhaps just one file? I noticed today (perhaps this is obvious to anyone but me), that if you use the command "git log <file>" or "git log <folder>", you only get the log from the commits where there was changes in that file or within that folder. This can quite often be useful when you want to track down a version of a particular file…

Advertisements
3 Comments leave one →
  1. Darby permalink
    April 4, 2013 5:15 am

    How can you get all BUT a certain folder?

    • nvartolomei permalink
      July 11, 2013 11:36 am

      git log !(certain_folder)

      • July 11, 2013 12:37 pm

        Ah, that was easy enough. Thanks!

        Though does anybody know how to do that in zsh? I see that your proposal works in bash, but in zsh I cannot figure out how to escape the special characters correctly.. 😦

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: