https://stackoverflow.com/questions/13103083/how-do-i-push-to-github-under-a-different-username

在git commit的时候就已经确定用户和email是谁,那么想要修改用户和邮箱,就需要在提交之前进行设置。
进行查看当前用户和邮箱,以及修改用户和邮箱:
# you can check what's currently:
git config user.name
git config user.email
git config user.name "your_github_username"
git config user.email "your_github_email"
# Again check what's currently:
git config user.name
git config user.email
设置全局生效使用--global
<span class="comment-copy">
<figure class="highlight"><pre><code class="language-html" data-lang="html">git config --global user.name <span class="ni">&amp;quot;</span>Mona Lisa<span class="ni">&amp;quot;</span></code></pre></figure>
</span>