Publishing you fickle fiend! Have you ever worked in the master page gallery and made edits to files, but when you ask other users to validate your work and they can't see it? It’s probably because the files aren't published for everyone to see. Instead of going through the UI and thinking you published all the files, here's a surefire way to publish every file in the master page gallery.
Sure you could turn off publishing in the master page gallery, but Powershell is a little bit sexier. Plus this script will tell you every file it's publishing. This script will not publish files that are checked out. Instead it'll kindly tell you that it can't publish that file because it's checked out. If you need to check in a bunch of files, you can do that with SharePoint Designer.
Just use this Powershell script. When you run it, provide the URL for your site collection.
Credit goes to Jonathan Rupp for writing this script two years ago. I recently ran into this scenario again and scoured my inbox to find this script to help save both the day and my sanity.