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 发布文章使用:只允许注册用户才可以访问!


  • 相关阅读:
    ecshop 商品分类下的销售排行
    ecshop批量清除商品的精品新品热销属性
    ECSHOP二次开发之给商品增加新字段
    ECSHOP首页调用文章内的缩略图
    ECSHOP给分类添加代表图
    ECSHOP首页促销商品下显示促销时间
    鼠标点击后更换背景
    ECSHOP如何修改商品评论或留言的日期
    ECSHOP设置指定IP才能登录后台
    ecshop远程图片本地化保存相册图片
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/13620471.html
Copyright © 2011-2022 走看看