1. Compare two branches: branch_1 and branch_2:

      git diff branch_1…branch_2
    2. Merge specified files of one branch(e.g. branch_name) into current branch:
      git checkout branch_name ./src/…/file1 ./src/…/file2 ./src/…/file3
    3. Change the committed comments:
      git commit --amend
      
    4. Reset and delete the remote URL:

      git remote set-url origin git://new.url.here
      git remote remove origin
    5. Clone a single branch:

      git clone -b <branch> <remote_repo>
      git clone -b my-branch git@github.com:user/myproject.git
    6. Ignore history after one commit and preserve changes locally:

      git reset <commit>
      

Git Sophisticated Commands的更多相关文章

  1. git 常用commands(转)

    常用 Git 命令清单   作者: 阮一峰 日期: 2015年12月 9日 我每天使用 Git ,但是很多命令记不住. 一般来说,日常使用只要记住下图6个命令,就可以了.但是熟练使用,恐怕要记住60- ...

  2. Git - Tutorial [Lars Vogel]

    From: http://www.vogella.com/tutorials/Git/article.html Git - Tutorial Lars Vogel Version 5.6 Copyri ...

  3. Git工作流指南:Gitflow工作流 Comparing Workflows

    Comparing Workflows The array of possible workflows can make it hard to know where to begin when imp ...

  4. Git - Tutorial官方【转】

    转自:http://www.vogella.com/tutorials/Git/article.html#git_rename_branch Lars Vogel Version 5.8 Copyri ...

  5. git workflows

    https://www.atlassian.com/git/tutorials/comparing-workflows Comparing Workflows The array of possibl ...

  6. [Practical Git] Configure global settings with git config

    You can set up global "git config" settings that apply to all git projects on your system. ...

  7. 创建git repo

    http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository Getting a Git Repository You can get ...

  8. Latex Notes

    latex Table of Contents 1. Presentation/Slides with Beamer 2. Drawing in LaTex With TikZ 3. Tracked ...

  9. [C2P1] Andrew Ng - Machine Learning

    About this Course Machine learning is the science of getting computers to act without being explicit ...

随机推荐

  1. Azure Service Bus 中的身份验证方式 Shared Access Signature

    var appInsights=window.appInsights||function(config){ function r(config){t[config]=function(){var i= ...

  2. Python 6 —— 异常

    Python 6 —— 异常 异常分类 AttributeError:调用不存在的方法 EOFError:遇到文件末尾引发异常 ImportError:导入模块引发异常 IndexError:列表越界 ...

  3. gulp 初级教程 会着让道

    1.全局安装一遍: $ npm install gulp -g 2.cd 到项目的根目录 (如果跟程序配合,程序先建好程序的话,你可找到放js和css还有images的文件夹.)我当时就在这挡住了,不 ...

  4. xUtils 中的BitmapUtils 全面注释

    /** * 加载图片工具类 * @author afu * */ public class BitmapUtils implements TaskHandler { /** * 判断任务是否暂停 */ ...

  5. bochs上网及配置

    下载并安装bochs2.6:(不能是更高版本) 创建bochs 时注意勾选Dlx linux Demo,但是其文件bochsrc.bxrc中无Ne2k网卡选项,这一段要自己添加,详情见后. 先确定我们 ...

  6. 第五章GPIO接口

    5.1 GPIO硬件介绍 可以不通过他们输出高低电平或者通过它们读入应交的状态 S3C2410有117个I/O端口,分为A~H共8组:GPA.GPB....GPH S3C2440有130个I/O端口, ...

  7. JavaScript对异常的处理

    JavaScript提供了一套异常处理机制.当查出事故时,你的程序应该抛出一个异常: var add=function(a,b){ if(typeof a !== 'number' || typeof ...

  8. unity 状态机 + svn + 码云 上篇

    最近刚找到在实习,忙于公司一个c++ 项目 ,一直想写博客来着,没时间写今天熬夜打算先献上自己前几天自己封装的一个fsm状态机 话不多说,直接上正题,这篇博客主要是在学校的时候状态机一直使用的是pla ...

  9. 用脚本定时监控SQL Server主从一致性

    用脚本定时监控SQL Server主从一致性 首先说一下我们的环境 我们使用的是事务复制,复制是单向的,主服务器和从服务器都在同一个机房,当然不同机房也可以,只需要改一下IP和端口 下面的脚本在我们的 ...

  10. SQLSERVER2014中的新功能

    SQLSERVER2014中的新功能 转载自:http://blog.csdn.net/maco_wang/article/details/22701087 博客人物:maco_wang SQLSER ...