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

# 仅当前项目
git config --local user.name  "你的名字"
git config --local user.email "你的邮箱"

# 或者全局
git config --global user.name  "你的名字"
git config --global user.email "你的邮箱"

# 重新设置包含用户名的 URL(把 YOUR_USERNAME 替换为你的实际用户名)
git remote set-url origin http://YOUR_USERNAME@datalab.lab.cn/datalab-model/ai-agents/data-compatibility.git