Added saving for each commit to db.