git-operations-rules
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGit Operations Rules
Git操作规则
Rule (CRITICAL)
规则(CRITICAL)
These rules MUST ALWAYS be followed when performing git operations.
在执行Git操作时,必须始终遵循以下规则。
git unstage
git unstage
Use to reset the staging area. Do not pass any options.
git unstagebash
git unstage使用重置暂存区,请勿添加任何选项。
git unstagebash
git unstagegit undo
git undo
Use to undo the last commit. Do not pass any options.
git undobash
git undo使用撤销最后一次提交,请勿添加任何选项。
git undobash
git undogit stash
git stash
Do not use shorthand. Use explicit commands:
- To save changes: (not
git stash push)git stash - To restore: (not
git stash apply)git stash pop
Before stashing, stage any new (untracked) files with so they are tracked; otherwise they will not be included in the stash.
git addbash
git add <new-files>
git stash push -m "<message>" -- <paths>请勿使用简写命令,请使用显式命令:
- 保存变更:(而非
git stash push)git stash - 恢复变更:(而非
git stash apply)git stash pop
在执行暂存前,请使用将所有新的(未跟踪)文件加入暂存区,使其被Git跟踪;否则这些文件不会被包含在暂存快照中。
git addbash
git add <new-files>
git stash push -m "<message>" -- <paths>Related Skills
相关技能
- git-commit - Use when creating git commits
- file-deletion-rules - Use when deleting files
- git-commit - 创建Git提交时使用
- file-deletion-rules - 删除文件时使用