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. Global文件编译发布,代码不执行的问题与解决

    问题:在Application_BeginRequest添加防止跨站点注入的过滤代码,VS2005编译成DLL发布后发现代码不会被执行: 环境:windows server 2008 r2 x64位  ...

  2. [转] 多进程下数据库环境的恢复:DB_REGISTER

    http://www.cnblogs.com/promise6522/archive/2012/05/09/2493542.html

  3. Windows 10 for phone 离我们不远了

    今天登录Windows Insider终于看到更多机型可以更新预览版了,看来Windows phone 10离我们不远了!

  4. 结对开发训练(郭林林&胡潇丹)

    此次编程题为:求一个整数数组最大子数组之和,要求时间复杂度为O(n). 首先,我们对题目做出分析,做出第一种预行方案,即定义一个数组,当数组中元素大于等于0时,进行累加:若小于0,则与后面的数作比较, ...

  5. WordPress访问打开速度很慢的几种解决方法

    最近WordPress网站访问特别的慢,有时间要加载一分钟才能完全打开,最初怀疑是服务器的问题,经过多方测试,还是没找到原因.后来,通过工具测出浏览器一直在加载fonts.googleapis.com ...

  6. 你真的已经搞懂JavaScript了吗?

    题目一: if (!("a" in window)) { var a = 1; } alert(a); 题目二: var a = 1, b = function a(x) { x ...

  7. 统一SDK接入(U8SDK)——总体思路和架构

    题记:很多做游戏开发的人,估计都或多或少地接过渠道SDK,什么UC,当乐,91,小米,360……据统计国内市场当前不下于100家渠道,还包括一些没有SDK的小渠道.每个渠道SDK接入的方法呢,多是大同 ...

  8. 解剖SQLSERVER 第十四篇 Vardecimals 存储格式揭秘(译)

    解剖SQLSERVER 第十四篇    Vardecimals 存储格式揭秘(译) http://improve.dk/how-are-vardecimals-stored/ 在这篇文章,我将深入研究 ...

  9. IIS负载均衡ARR路由请求到ARR服务器和处理服务器

    .net web 使用IIS ARR(Application Request Route)技术实现web的高性能.高可靠.易扩展及负载均衡.ARR的使用请参考 IIS负载均衡-Application ...

  10. 作业三(代码规范、代码复审、PSP)

    1.代码规范: 我支持代码要有规范,理由如下. (1).艺术是一个很带有个人风格的学科,天马行空才能凸显出自己的价值.但不要忘了,会艺术的不是生下来就会艺术, 他也需要按照前辈的步骤一步一步的学习基础 ...