随笔分类 - Git
摘要:git-rev-list - Lists commit objects in reverse chronological order https://git-scm.com/docs/git-rev-list 按照时间顺序倒序排列的commit Update: If all you need is
阅读全文
摘要:方法一http://stackoverflow.com/questions/25815202/git-fetch-a-single-commitThegit fetchcommand deliversreferences(names, not raw commit-IDs) to the remot...
阅读全文
摘要:要删除本地,首先要考虑以下三点 列出所有本地分支 搜索目标分支如:所有含有‘dev’的分支 将搜索出的结果传给删除函数 所以我们可以得到: git br |grep 'dev' |xargs git br -d 本地新建了很多分支,比如 $ git branch brabch branch2 bra
阅读全文
摘要:原文链接 http://nvie.com/posts/a-successful-git-branching-model/ 有人发现git work flow的缺点,历史提交会变得混乱 http://endoflineblog.com/gitflow-considered-harmful http:/
阅读全文
摘要:rebase和merge的正确使用时机https://medium.com/@porteneuve/getting-solid-at-git-rebase-vs-merge-4fa1a48c53aagit的subtree的用法https://medium.com/@porteneuve/master...
阅读全文
摘要:.gitignore NuGet exclude packages/ include packages/repositories.config 回答1 I faced the same issue. None of the above solutions worked for me. And I t
阅读全文
摘要:以前使用git,都要参考这个来进行中文支持 http://blog.csdn.net/son_of_god/article/details/7341928 有一次更新了git之后,发现默认支持了中文【在推送的时候】 今天使用的时候,发现在git bash里面,无法显示中文 1.在git bash中显
阅读全文
摘要:https://git-scm.com/docs/git-stash 在git svn的时候使用,提交记录的时候,有部分文件的修改不需要commit。 在向svn进行git svn dcommit的时候,必须保存本地目录是clean的。所以需要进行stash,然后在dcommit dcommit之后
阅读全文
摘要:1.使用命令来直接查找 假设有分支A和分支B,那么使用以下命令 【http://stackoverflow.com/questions/1549146/find-common-ancestor-of-two-branches】 git merge-base A B 就可以查看这2个分支的共同父节点
阅读全文
摘要:git for windows 2.5 版本发布了,更新之后,使用git svn的时候,就出错git svn rebase Or git svn dcommitAfter a update git for windows 2.5,I encountered this problem.$ git sv...
阅读全文
摘要:find commit by hash sha in git问题:I need to find a commit in Git by given hash SHA. For example, if I have "a2c25061" hash, and I need to get the autho...
阅读全文
摘要:查看所有的标签git tag 删除某一个标签git tag -d tagName 创建带注释的标签 git tag -a tagName -m "annotate" 轻量级标签 git tag tagName 切换到某一个标签 git checkout tagName http://blog.csd
阅读全文
摘要:git push warning questions This warning was introduced in Git 1.7.11 along with the simple style of pushing. The issue is that the current default, ma
阅读全文
摘要:1.第一种方法git gui菜单栏上repository-->visual all branch history或者直接使用命令gitk --all2.在git bash中,使用命令查看git log --graph --all【命令行查看不太适合相差太大的分支,分支的共同父节点和分支的当前节点隔开...
阅读全文
摘要:http://code.tutsplus.com/tutorials/rewriting-history-with-git-rebase--cms-231911. Rebasing for a Linear HistoryThe first use case we'll explore involv...
阅读全文
摘要:在develop分支上rebase另外一个分支master,是将master作为本地,develop作为远端来处理的。 最后的效果是,develop分支看起来像是在master分支的最新的节点之后才进行开发的 develop分支上的commit记录 Administrator@LuJunTao MI
阅读全文
摘要:How do I create a new git branch from an old commit?git checkout -b justin a9c146a09505837ec03bThis will create the new branch and check it out.git br...
阅读全文
摘要:Make an existing Git branch track a remote branch? Given a branch foo and a remote upstream: As of Git 1.8.0: Or, if local branch foo is not the curre
阅读全文
摘要:1.命令行中查看日志 git log 默认是显示所有的日志信息,之前出来的界面显示的日志,很少。 最后发现,只需要使用键盘上向下键↓,就可以继续浏览更多的日志 空格键,可以翻页浏览日志。 向左← 向右 → 的箭头,可以水平移动查看日志 2.将日志按照格式导出到文件中 git log --pretty
阅读全文
摘要:一、使用了git reset之后,想要找回某一个commit1.git log -g 这个命令只能显示少部分的commit推荐使用git reflog找到想要恢复的那个commit的hash,假如目标hash为618a561实际操作中,一般只要前6位就可以定位到具体的commit2.gitreset...
阅读全文