2017-09-22 git git and gerrit git常用master开发123git add # add后如果再修改,需要再add一次,否则提交add时版本git commit -m "adshow-3-6-1 feed support"git push origin master:refs/for/master branch开发123git add git commit -m "sth" git push origin master:refs/for/patserver_1-0-23_BRANCH 遇到stash冲突123git stash # 将本地冲突改动 存入栈中git pull # 更新git stash pop #从栈中将改动拉出 已经push文件回滚1git checkout commit_id --file_name git恢复删除文件之ls-files 修改已经commit的评论1git commit --amend 进入默认编辑器打开的评论文件,修改保存退出,可写在多行 切换到远程分支查看本地及远程分支 1git branch -va git切换到远程分支 1git checkout -t origin/2.0.0 gerrithow gerrit works Newer boost::lexical_cast Older shell uniq count