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


  • 相关阅读:
    Ubuntu下添加定时任务执行php文件
    linux的scp命令可以在linux服务器之间复制文件和目录
    Linux下OpenSSL加密解密压缩文件(AES加密压缩文件)
    解决远程连接mysql很慢的方法(mysql_connect 打开连接慢)
    PHP URL参数获取方式的四种例子
    url格式化函数http_build_query() 和parse_str() 函数
    php 调用 webservice 中文乱码解决方案
    Linux添加vsftp账户和设置目录权限
    PHP 的 HMAC_SHA1算法 实现
    MySQL多表关联查询数量
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/13620471.html
Copyright © 2020-2023  润新知