git
TaoTao Li
擅长C/C++、Python、Golang编程
熟悉推理服务、搜索引擎、算法平台化开发
展开
-
git 实用命令整理
gitreset--hardHEAD~i 本地代码回滚到指定之前第i个版本git push -f origin local_branch:remote_branch 加入-f参数,强制提交,远程端将强制跟新到reset版本当需要对远程分支的多次提交撤销时,可以使用这两个命令,可以把本地撤销的提交同步到远程分支但是如果撤销错误,会导致找回比较麻烦,一般提交git pu原创 2016-10-26 15:10:22 · 297 阅读 · 0 评论 -
合并两个git仓库
转载自:https://blog.csdn.net/gouboft/article/details/8450696描述下case如下:有2个git仓库:repo1、repo2; 想将repo1中的文件移入repo2; repo1的历史日志要保留;首先,快速创建2个仓库。 mkdir repo1cd repo1git initecho "repo1.txt" >...转载 2018-12-12 17:46:08 · 158 阅读 · 0 评论 -
git lg 使用
转载自:https://luolei.org//better-git-log/#commentsGit是一个强大的版本管理器,建议每一个开发者或者开发团队都可以使用git。想当初,自己code的时候还是用evernote来保存一些代码片段,以免写烂,自从用上git后,妈妈再也不用担心code shit了。git log 命令是查看全部提交日志git log -2 查看最近2次的...转载 2018-12-11 23:28:54 · 2354 阅读 · 0 评论