git & repo使用
实践:
1. 我写了一个模块,在单独分支上开发,上面有几个提交,最后我要合成一个提交merge到主开发分支上,再提交到远程gerrit。
一种做法是我用git rebase -i HEAD~3, 这里会弹出一个编辑界面,把几个提交的commit id都列出来,要留下来的记录就用pick. or use squash to merge to
the only picked commit id. After this, I got only one commit that can be merged to main dev branch.
2. I checkout to the main dev branch and use git merge to merge the previous commit to current branch. But if I submit this commit to gerrit using 'git push',
there will be two commit because also a new merge commit generated and added. so I use 'git reset --soft' in main branch to change the index to the commit
when merge was not happen. after this, the status of merged changes becomes uncommited(use git status), then I can commit those changes and submit the
merge(Though, from git history, it has nothing to do with the branch where we got the changes).
http://www.cnblogs.com/l78zzz/articles/2435346.html
[a better git log]
https://coderwall.com/p/euwpig/a-better-git-log
repo命令的用法: $repo COMMAND OPTIONS 可选参数用方括号("[]")括起来,可以使用下面指令获取每个repo命令的帮助信息: $repo help COMMAND 许多命令使用工程列表作为参数,可以使用工程名或者工程所在的本地目录名: $rep
一张图搞定源代码管理之git - 简书什么是git?git是一款开源的分布式版本控制工具在世界上所有的分布式版本控制工具中,git是最快、最简单、最流行的git的起源作者是Linux之父:LinusBenedictTorvalds当初开发git仅仅是为了辅助Linux内核的开发(管理源...Git常用命令 - Knowhow - Confluence
https://www.atlassian.com/git/tutorials/setting-up-a-repository

浙公网安备 33010602011771号