zoukankan      html  css  js  c++  java
  • [Git] Git 常用技巧

    版本对比

    1. 对比两个 COMMIT

    git diff <commit> <commit>

    2. 对比 COMMIT 和父 COMMIT

    git diff <commit^>git diff-tree -p <commit>

    3. 只显示某一个 commit 修改过的文件名称

    git diff-tree --no-commit-id --name-only -r <commit>

    示例:

    $ git diff-tree --no-commit-id --name-only -r HEAD
    
    src/packer/GitMessenger.java
    src/packer/PackerModule.java
    

    4. 签出单个文件

    git checkout <branch> path/to/the/file
    git checkout <commit> path/to/the/file
    
  • 相关阅读:
    POST
    界面,数据下载
    异步下载
    Cell
    循环&信息添加&颜色修改
    通讯录
    图片循环
    多删搜索
    图片滚动
    TableView
  • 原文地址:https://www.cnblogs.com/ifantastic/p/4080642.html
Copyright © 2011-2022 走看看