Skip to content

Instantly share code, notes, and snippets.

@jstruzik
Last active May 9, 2016 20:25
Show Gist options
  • Save jstruzik/ed5d502ae0993fd14684d3a61eeb62dd to your computer and use it in GitHub Desktop.
Save jstruzik/ed5d502ae0993fd14684d3a61eeb62dd to your computer and use it in GitHub Desktop.
Update PHPDoc copyright date only for modified files between branches
@Rican7
Copy link

Rican7 commented Apr 5, 2016

Here's how to do it in GNU sed:

git diff --name-only branch_to_compare | xargs sed -i -r "s/@copyright [0-9]{4}/@copyright "$(date "+%Y")"/g"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment