zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    图解 git

    $ git --version
    # git version 2.24.3 (Apple Git-128)
    
    $ git --help
    ###
    usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
               [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
               [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
               [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
               <command> [<args>]
    
    These are common Git commands used in various situations:
    
    start a working area (see also: git help tutorial)
       clone     Clone a repository into a new directory
       init      Create an empty Git repository or reinitialize an existing one
    
    work on the current change (see also: git help everyday)
       add       Add file contents to the index
       mv        Move or rename a file, a directory, or a symlink
       restore   Restore working tree files
       rm        Remove files from the working tree and from the index
    
    examine the history and state (see also: git help revisions)
       bisect    Use binary search to find the commit that introduced a bug
       diff      Show changes between commits, commit and working tree, etc
       grep      Print lines matching a pattern
       log       Show commit logs
       show      Show various types of objects
       status    Show the working tree status
    
    grow, mark and tweak your common history
       branch    List, create, or delete branches
       commit    Record changes to the repository
       merge     Join two or more development histories together
       rebase    Reapply commits on top of another base tip
       reset     Reset current HEAD to the specified state
       switch    Switch branches
       tag       Create, list, delete or verify a tag object signed with GPG
    
    collaborate (see also: git help workflows)
       fetch     Download objects and refs from another repository
       pull      Fetch from and integrate with another repository or a local branch
       push      Update remote refs along with associated objects
    
    'git help -a' and 'git help -g' list available subcommands and some
    concept guides. See 'git help <command>' or 'git help <concept>'
    to read about a specific subcommand or concept.
    See 'git help git' for an overview of the system.
    ###
    
    

    git basic

    $ git status
    
    $ git diff
    
    $ git add .
    
    $ git commit -m"feat: add a new ferature"
    
    $ git pull
    
    $ git push
    
    $ git merge
    
    $ git rebase
    
    
    
    

    git advanced

    # delete git commit history 
    $ git filter-branch
    
    

    git filter-branch

    remove git commits history

    $ git clone https://github.com/xgqfrms/xgqfrms
    
    # git checkout gh-pages
    $ cd github/xgqfrms
    
    $ git filter-branch --force --index-filter 
      "git rm --cached --ignore-unmatch tools/WebStrom-2016.2.4.md" 
      --prune-empty --tag-name-filter cat -- --all
    
    # what's `\` & `""` means in git cli???
    $ git filter-branch --force --index-filter "git rm --cached --ignore-unmatch tools/WebStrom-2016.2.4.md" --prune-empty --tag-name-filter cat -- --all
    
    
    

    refs

    https://www.cnblogs.com/xgqfrms/p/13338946.html

    remove GitHub git commit history

    https://learngitbranching.js.org/

    https://github.com/pcottle/learnGitBranching

    https://zhuanlan.zhihu.com/p/122474549

    https://github.com/geeeeeeeeek/git-recipes/wiki



    ©xgqfrms 2012-2020

    www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


  • 相关阅读:
    PHP使用引用变量foreach时,切记其他循环不要使用同一个名字的变量
    PHP 获取给定时间的周日时间或月末时间或每天
    MySQL Load Data InFile 文件内容导入数据库和 Into OutFile导出数据到文件
    直接拿来用!最火的iOS开源项目(一)
    12个有趣的C语言问答
    Flex,Flash,AS3,AIR的关系和区别
    Stage3D大冒险
    c/c++程序中内存区划分
    IOS—— strong weak retain assign 学习
    如何提高你的移动开发中AS3/AIR性能
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/13620471.html
Copyright © 2011-2022 走看看