
git
Alanyannick
Computer Vision, Machine learning, Artificial intelligence.
展开
-
Git备份当前branch并回滚到当前版本
1.首先,必须再次强调定时update git代码是一个很必须的习惯,基本重要性可以等同于control+s。 2.接着叙述一下今天遇到的问题,和使用的情形: 1)我更改了一版功能,并在这版功能上加了一些大量的注释供给自己理解。2)接着,我发现这个功能实际上对于目前task是冗余的,相当于自己实现了一个没用的功能,于是要回滚,但是注释对于我理解很关键。那么问题来了,我想保留原创 2016-12-28 15:53:42 · 3134 阅读 · 0 评论 -
git cherry-pick使用小结
git cherry-pick可以选择某一个分支中的一个或几个commit(s)来进行操作。例如,假设我们有个稳定版本的分支,叫v2.0,另外还有个开发版本的分支v3.0,我们不能直接把两个分支合并,这样会导致稳定版本混乱,但是又想增加一个v3.0中的功能到v2.0中,这里就可以使用cherry-pick了。就是对已经存在的commit 进行 再次提交;简单用法:g转载 2017-08-23 14:03:45 · 1526 阅读 · 0 评论 -
git merge 和 git rebase 小结
git merge是用来合并两个分支的。git merge b # 将b分支合并到当前分支同样 git rebase b,也是把 b分支合并到当前分支-----------------------------------他们的 原理 如下:假设你现在基于远程分支"origin",创建一个叫"mywork"的分支。$转载 2017-08-23 14:02:45 · 1964 阅读 · 0 评论 -
Markdown语法参考
0. 目录0. 目录1. 斜体和粗体2. 分级标题3. 超链接3.1. 行内式3.2. 参考式3.3. 自动链接4. 锚点5. 列表5.1. 无序列表5.2. 有序列表5.3. 定义型列表5.3. 列表缩进5.4. 包含段落的列表5.5. 包含引用的列表5.6. 包含代码区块的引用5.7. 一个特殊情况6. 引用6.1. 引用的多层嵌套6转载 2017-05-21 22:37:20 · 697 阅读 · 0 评论 -
Jekyll背景post设置参考
1.Post 的demohttps://mmistakes.github.io/minimal-mistakes/year-archive/2. Demo参考code链接, 可编辑查看https://github.com/mmistakes/minimal-mistakes/tree/master/docs/_posts原创 2017-05-21 18:06:34 · 1541 阅读 · 0 评论 -
解决SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed.
reference: https://gist.github.com/fnichol/867550https://gist.github.com/luislavena/f064211759ee0f806c88Why?InstallationThe Ruby Way! (Fun)This assumes your have alread原创 2017-05-20 14:51:10 · 5158 阅读 · 0 评论 -
解决invalid byte sequence in GBK
在post.html模板里面加入中文之后,jekyll server命令直接报错。解决办法是在运行服务器前先运行chcp 65001命令,即可解决。在官方找到的解决办法Windows users: run chcp 65001 first to change the command prompt's character encoding (code page)转载 2017-05-20 14:53:36 · 3444 阅读 · 0 评论 -
Problems and solutions when run Jekyll on Windows
Problems and SolutionsProblemGem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 readserver certificate B: certificate verify failed(https://rubygems.org0---------------转载 2017-05-20 14:11:28 · 882 阅读 · 0 评论 -
解决windows安装jekyll时的问题
1.Windows下安装jekyll建议直接安装chocolatey来装ruby。我因为在装的时候ruby和实际的gemfile版本不对,导致了很多问题。参考链接 https://chocolatey.org/install#install-with-cmdexe进入cmd,run如下命令安装chocolatey:@powershell -NoProfile -Executio原创 2017-05-20 14:08:46 · 524 阅读 · 0 评论 -
Git Init repository for remote terminal and change the remote master
1. Create new repository Command line instructionsGit global setupgit config --global user.name "wenyangming"git config --global user.email "xxx@xxxx.com"Create a new repositorygi原创 2016-12-27 16:38:25 · 470 阅读 · 0 评论 -
git clone指定远程分支
git clone代码的时候,如果远端有分支下,可以使用如下命令指定要clone的分支:git clone -b 例如: git clone -b 指定的分支名字原创 2017-01-16 16:48:19 · 1947 阅读 · 0 评论 -
git pull和git fetch的区别小结
总而言之,几句话概括 1.git pull = git fetch + git mergegit pull会将本地库更新至远程库的最新状态 由于本地库进行了更新,HEAD也会相应的指向最新的commit id2.git fetch的时候只是将remote的origin进行update 但是并没有在local的branch进行merge一张图概括:原创 2017-08-23 14:43:09 · 5189 阅读 · 1 评论