git/gerrit 常用命令记载

来源:互联网 发布:网络作家笔名 编辑:程序博客网 时间:2024/05/22 19:51

//gerrit 提交命令

git push origin branch-name:refs/for/branch-name


//生成change-id,先将gerrit的commit-msg 拷到本地的 .git/hooks下面。

scp -p -P 29418 username@gerrit.example.com.cn:hooks/commit-msg .git/hooks/

git commit --amend


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

git rev-parse命令


git rev-parse --git-dir显示版本库.git目录所在位置git rev-parse --show-toplevel显示工作区根目录git rev-parse --show-prefix所在目录相对于工作区根目录的相对目录git rev-parse --show-cdup显示从当前目录后退到工作区的根的身度





原创粉丝点击