git使用
配置用户名和邮箱
git config --global user.name "你的名字或昵称" git config --global user.email "你的邮箱"
ssh key相关
生成公钥
ssh-keygen -t rsa -C "xxxxx@xxxxx.com"
查看public key
cat ~/.ssh/id_rsa.pub
版本回退
1.查看提交历史,以便确定要回退到哪个版本。
git log / git log --pretty=oneline #找到想回退的commit_id
2.回退到之前的历史版本:
git reset --hard commit_id
3.反悔了,回到之前的版本
git reflog #查看所有的版本操作历史 git reset --hard commit_id