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. INotifyPropertyChanged接口的PropertyChanged 事件

    INotifyPropertyChanged 接口用于向客户端(通常是执行绑定的客户端)发出某一属性值已更改的通知. 例如,考虑一个带有名为 FirstName 属性的 Person 对象. 若要提供 ...

  2. 再谈CSHELL对C程序员的价值

    几个礼拜前,介绍了CSHELL.http://www.cnblogs.com/hhao020/p/4974542.html今天再试着介绍下,希望能有更多C程序员留意到它,从中获益. 很多年前,我在调试 ...

  3. jquery操作dom

    1访问元素(属性,内容,值,css) 1元素属性(获取,设置,删除) .attr(name) .attr(key, value)  || .attr({key0:value0, key1:value1 ...

  4. Android中的PopupWindow

    1.功能 PopupWindow这个类用来实现一个弹出框,可以使用任意布局的View作为其内容,这个弹出框是悬浮在当前activity之上的,可以设置显示位置. 2.需求 弹出软键盘,实现键盘功能从而 ...

  5. 地图、定位 CLLocationManager CLGeocoder CLPlacemark

    地图.定位 一.基本知识点 定位: 1.info.plist文件设置 ios8以后,使用定位需要在info.plist文件中添加两个字段NSLocationAlwaysUsageDescription ...

  6. 重启Ubuntu后Hadoop的namenode起不来的解决办法‬

    因为Ubuntu每次重启之后都会将/tmp目录清空,而默认配置下每次hadoop name node -format总是将数据信息定位到/tmp/hadoop-${user.name}中,因此需要修改 ...

  7. linux指令之文件的创建、查询、修改

    mkdir(make directory) 功能:创建目录 案例: mkdir test 点评:将创建一个目录名为test的目录 rmdir(remove directory) 功能:删除目录 案例: ...

  8. idlcpp 功能改进

    最近没有续写 idlcpp 的教程, 因为忙着对它进行大幅度的修改. 一开始本是计划用idlcpp对付新写的代码,让这些新写的代码能够很容易提供给脚本使用.后来又希望能将大量现存的代码移植过来,毕竟有 ...

  9. QC11客户端安装

    win10使用hp qc11 步骤1:安装vcredist_x86,32位 步骤2:安装浏览器客户端 ALMExplorerAddIn,11版本 可能遇到的问题 1. 出现Initialization ...

  10. AlwaysON同步的原理及可用模式

    新一代读写分离技术——AlwaysOn 早在SQL Server 2005的时候微软就已经实现了数据库的查询分离技术——发布订阅.但生产库和查询库的同步性能较差,时常出现性能问题,因此在大型生产环境中 ...