git - Git如何使用不是我的昵称推送到远程
问题描述
我有自己的远程仓库,但我想用我的名字和姓氏而不是我的昵称来推送它。但是,没有一个git config
选项对我有用。
解决方案
If You want to do this only for the last commit, You can reset the branch to the state before the mentioned commit, set proper details usinggit config
and then make a commit and force push the last commit to the repo.
If however You would like to do this for multiple commits, then it is a little bit harder and requires rewriting the history. The script to do this has already been provided on StackOverflow: How to change the author and committer name and e-mail of multiple commits in Git?.
推荐阅读
- angular - Angular 8 渲染组件在 DOM 中没有额外的包装元素
- python - 为什么以下代码在 C 和 Python 中给出不同的输出?
- reactjs - recharts中饼图提供cornerRadius后如何加入
- r - 为什么在ggplot的geom_bar中需要stat =“identity”?
- kubernetes - Kubernetes 服务外部名称
- python - Python 滚动浏览您的 Instagram 关注者列表上的溢出滚动框?
- prolog - 如何在 Prolog 中从家谱中找到所有双胞胎
- vue.js - Vue:是否可以在 Vuex 动作中设置另一个状态?
- java - 将 HFM(Hyperion 财务管理)VB 迁移到 Java 新 API
- encryption - 如何使用 node forge 解密 CMS /PKCS#7