遴选分支:把某一个分支上的commit 内容 添加当前分支上
git cherry-pick commitHashCodeA -x -s 遴选某次commitA 到当前分支
gti cherry-pick commitHashA commitHashB 遴选commitA 到commitB 之间范围的提交记录到当前分支
-x 表示添加cherry picked from commit... 说明
-s 表示添加上作者签名
git blame -L 100,200 xxx.cpp 查看xxx文件的100 - 200 行之间代码的提交记录
git show commitID 查看log提交详情
git pull --rebase 拉取代码
暂存某个文件:
git stash push -m "xxx" filepath
代码提交流程
git stash 暂存当前所有修改
git pull --rebase 拉取最新代码
git stash pop
git add . 把当前修改以及新加文件添加到工作区
git add -u 把当前修改文件添加到工作区
git commit -m "提交xxx功能代码"
git push 推送到远端