解决 Github用户名 变为 invalid-email-address 问题

解决 Github用户名 变为 invalid-email-address 问题

952608-20170125103931831-700915641.png

If the identity used for this commit is wrong, you can fix it with:

git commit --amend --author='Your Name <you@example.com>'

一、首页解决操作

补上 Github 邮箱信息:vim $HOME/.gitconfig

git config --global user.name "username"
git config --global user.email "username@email.com"
git push origin master

952608-20170125104558347-1819954022.png

这时候我们就可以发现,首页已经恢复正常了。

注意:不要使用 "git init" 初始化命令!

二、内容页解决

查看 Github 日志:bash -c "git log"

952608-20170125111211425-1263232178.png

git rebase --interactive 4d49c2e
--interactive/-i 4d49c2e/4d49c2e995be282f8335(略)cde4194e

952608-20170125112321737-395385267.png

git commit --amend --reset-author

git rebase --continue
git rebase --continue
git rebase --continue

952608-20170125112819597-238893902.png

git push -f  强制覆盖推到远端

注意:平常操作并不会用到上述所有命令,用不好大家的 commit 会丢失或者被篡改的

感兴趣,可以新建个 repo 研究下~

952608-20170125104902034-95526425.png

小猫咪问你,解决了嘛~

一些其他

Git版本控制

创建仓库
git init
git clone
git config

保存修改

git add
git commit

查看仓库

git status
git log –oneline

撤销修改

查看之前的commit

git checkout
git checkout
git checkout

撤销公共修改

git revert

撤销本地修改

git reset
git clean

重写Git历史记录

git commit –amend
git rebase
git reflog

Git协作开发

分支

git branch
git checkout
git merge

仓库同步

git remote
git fetch
git pull
git push

转载于:https://www.cnblogs.com/itxdm/p/6349239.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值