Git操作记录

 

Here’s the table of contents:

  1. 操作

操作

# 撤销某次提交,会自动为你生成一个新的撤销提交
git revert <commit-id>
# 将撤销提交推送到远程
git push
# 清除Windows凭据管理器中的凭据
# 查看所有凭据
cmdkey /list

# 删除与datalab.china.cn相关的所有凭据
cmdkey /delete "git:http://datalab.china.cn"
# 仅为当前项目设置用户名
git config user.name "您想要的用户名"
git config user.email "您的邮箱@example.com"
# 查看当前项目的配置
git config --list --local
# 查看全局配置
git config --list --global