Git-Fu

Recently, I wanted to see what files in a commit changed over here at Tumblr so that we could do some syntax checking.

So I needed to basically see all the files that changed on a merge commit that happened with 2 parents. The following command pulls out all the php files from that merge commit.

git show --pretty="format:" --name-only parent1...parent2 | grep .php | sort | uniq

With this one liner, I have a list of all the different files that changed in the commit, ready to be lint checked. Neat, huh? Git is awesome.

  1. premium-magento-templates reblogged this from codingjester
  2. dakdad reblogged this from codingjester
  3. mies reblogged this from codingjester
  4. engineering reblogged this from codingjester
  5. alexcoco said: I<3GIT
  6. codingjester posted this