【Gerrit】异常集合 (笔记)

  • 异常:committer email address,does not match your user account.
    解决方法:
  1. git config --global user.name ‘xxxxx’ //修改用户名
  2. git config --global user.email ‘xxxxxxx’ //修改邮箱
  3. git commit --amend --reset-author
  • 常用命令
    git pull //把远程库的代码更新到工作台

git pull --rebase origin master //强制把远程库的代码跟新到当前分支上面

git fetch //把远程库的代码更新到本地库

git add . //把本地的修改加到 stage 中

git commit -m ‘comments here’ //把 stage 中的修改提交到本地库

git branch 查看远程分支/全部分支

git checkout master/branch //切换到某个分支

git checkout -b test //新建 test 分支

git checkout -d test //删除 test 分支

git merge master //假设当前在 test 分支上面,把 master 分支上的修改同步到 test 分支上 git merge tool //调用 merge 工具

git stash //把未完成的修改缓存到栈容器中

git stash list //查看所有的缓存

git stash pop //恢复本地分支到缓存状态

git blame someFile //查看某个文件的每一行的修改记录()谁在什么时候修改的)

git status //查看当前分支有哪些修改

git log //查看当前分支上面的日志信息

git diff //查看当前没有 add 的内容

git diff --cache //查看已经 add 但是没有 commit 的内容

git diff HEAD //上面两个内容的合并

git show commit-id //显示某次 commit-id 的修改内容

git reset --hard HEAD //撤销本地修改

git reset --hard commit-id //撤销 commit-id 前面的所有修改

git apply test.patch //打包 patch

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值