When deploying an application I prefer to avoid sharing things like database usernames and passwords with github. This is an approach I would recommend you to follow as well.
The Typesafe config library allows you achieve this quite easily. Setup all your default config in application.conf (src/main/resources) and override it in a local file (i.e. prod.conf) on the production server.
In prod.conf you would like to include the elements from application.conf and only override the database username and the password. To allow this you start the file with include "/application.conf" for importing a file from the classpath. The slash is important as If you only use include "application.conf" it will look for one in the same directory as your prod.conf.
The last thing we need to do is to let the application know about the prod config: java -Dconfig.file="prod.conf" -cp my.jar MyClass