 <p>You could try and have a hook on the server, triggered when receiving (like, for instance, this <a href="https://github.com/kwangchin/GitHubHook" rel="nofollow"><strong>GitHubHook</strong>: a GitHub Post-Receive Deployment Hook</a>), which would:</p> <ul> <li>modify the local <code>.git/config</code> file</li> <li>adding a user.name and user.email in said config file</li> </ul> <p>That would presume the deploys commits are done <em>before</em> the next push from GitHub to the server, otherwise, the wrong credential would be used.</p> <p>If the previous point is a concern, then you can improve that by:</p> <ul> <li>storing those credentials elsewhere, in order of the deployments, </li> <li>and make sure the deploy commits are done with a <code>git commit --author='AUserName &lt;some@email.com&gt;</code>, with name and email extracted from the separate file, based on the recorded order.</li> </ul> <p>In that last case, no need to modifying a local config: you build your <code>git commit</code> command with the right parameters, instead of relying on a local config file content.</p>