zoukankan      html  css  js  c++  java
  • Git CMD

    命令格式

    git commit [-a | --interactive | --patch] [-s] [-v] [-u<mode>] [--amend]
          [--dry-run] [(-c | -C | --fixup | --squash) <commit>]
          [-F <file> | -m <msg>] [--reset-author] [--allow-empty]
          [--allow-empty-message] [--no-verify] [-e] [--author=<author>]
          [--date=<date>] [--cleanup=<mode>] [--[no-]status]
          [-i | -o] [-S[<keyid>]] [--] [<file>…​]

    命令参数

    -a, --all
      直接将工作区的修改提交至仓库。

    实例

    a) 将暂存区的提交至仓库

    [huey@huey-K42JE hello_git]$ date > datetime.txt 
    [huey@huey-K42JE hello_git]$ git add .
    [huey@huey-K42JE hello_git]$ git commit -m "change datetime"
    [master 7983be4] change datetime
     1 files changed, 1 insertions(+), 1 deletions(-)

    b) 直接将工作区的修改提交至仓库

    [huey@huey-K42JE hello_git]$ rm datetime.txt 
    [huey@huey-K42JE hello_git]$ date > datetime.txt 
    [huey@huey-K42JE hello_git]$ git commit -a -m "rm testfile & change datetime"
    [master 5622ecb] rm testfile & change datetime
     2 files changed, 1 insertions(+), 2 deletions(-)
     delete mode 100644 testfile.txt

    更多

    http://git-scm.com/docs/git-commit

  • 相关阅读:
    TO DO List
    springboot 热部署
    <dependencyManagement>的作用
    人体工程学座椅
    temp
    temp
    声明式编程和命令式编程的本质区别
    weak first question
    Spring依赖注入方式和依赖来源
    SpringBoot 整合 H2 数据库
  • 原文地址:https://www.cnblogs.com/huey/p/5089619.html
Copyright © 2011-2022 走看看