Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

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 

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 last year's update:

  • No labels