To paraphrase from my own comment last month [1]:
"Some time ago I published my blog to GitHub, with my MailGun API key in the config file (stupid mistake, I know). In less than 12 hours, spammers had harvested the key AND sent a few thousand emails with my account, using my entire monthly limit.
Thankfully I was using the free MailGun account, which is limited to only 10,000 emails/month, so there was no material damage. And MailGun's tech support was awesome and immediately blocked the account and notified me, reseting the account after I had changed the keys."
If you're wondering how they were able to harvest GitHub commits so quickly, just read the article linked in that thread [2]. Basically you have bots drinking from GitHub's events firehose and the GHTorrent project. Every commit is monitored and harvested for passwords on the fly.
[1] https://news.ycombinator.com/item?id=8818035
[2] http://jordan-wright.com/blog/2014/12/30/why-deleting-sensit...
That said, as the article points out, you need to consider them compromised once they've been pushed and rotate the creds.