git-cm

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Git Commit

Git Commit

Commit changes with a conventional commit message.
  1. Check the current git status to understand what has changed.
    • Command:
      git status
  2. View the diff if necessary to understand the changes better.
    • Command:
      git diff --staged
      or
      git diff
  3. Add all changes to the staging area (unless specific files are requested).
    • Command:
      git add .
  4. Commit the changes with a descriptive and conventional commit message.
    • Command:
      git commit -m "<type>: <subject>"
    • Ensure the message follows conventional commit standards (e.g., feat, fix, chore, docs, refactor).
使用约定式提交信息提交变更。
  1. 查看当前Git状态,了解具体变更内容。
    • 命令:
      git status
  2. 如有必要可查看代码差异,更好地掌握变更详情。
    • 命令:
      git diff --staged
      git diff
  3. 将所有变更添加至暂存区(若需提交指定文件则无需执行此操作)。
    • 命令:
      git add .
  4. 使用描述性的合规约定式提交信息提交变更。
    • 命令:
      git commit -m "<type>: <subject>"
    • 确保提交信息符合约定式提交标准(如feat、fix、chore、docs、refactor)。