Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

There is a gem called license_header that has a tool for removing and adding license headers. It takes a text file like header.txt and adds it as a comment, changing the comment style for the different filetypes.

I used it like this 

Code Block
license_header -a -f <header file> #see how many files need to be udpated
license_header -r <directory or file> #recursively remove headers
license_header -u -f <header file> <directory or file to change> #update headers

Things to look out for

Don't add headers to the files in the config directory.

The update overwrote one line of code that was a little too close to the header. Out of 328 updates, that's not bad, just something to look for. 

I recommend committing in chunks. Github can only display so many changes before it cuts off the commit. Push up smaller commits, check your changes in the nice handy interface, then rebase and force push back to the branch you're using.

Avoid putting headers on things we didn't actually make, like javascript libraries, db/migrates, the test directory, etc...


Here's 2015's update: