sl-commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSmart Sapling Commit
智能Sapling提交
Create well-formatted commits following the Conventional Commits specification using Sapling SCM.
<EXTREMELY_IMPORTANT>
Windows Note: Use the full path toto avoid conflicts with PowerShell's built-insl.exealias forsl. </EXTREMELY_IMPORTANT>Set-Location
使用Sapling SCM按照约定式提交(Conventional Commits)规范创建格式规范的提交记录。
<EXTREMELY_IMPORTANT>
Windows注意事项: 请使用的完整路径,避免与PowerShell内置的sl.exe命令的Set-Location别名冲突。 </EXTREMELY_IMPORTANT>sl
What This Skill Does
本技能功能
- Checks which files have changes with
sl status - If there are untracked files to include, adds them with
sl add - Performs a to understand what changes are being committed
sl diff - Analyzes the diff to determine if multiple distinct logical changes are present
- If multiple distinct changes are detected, suggests breaking the commit into multiple smaller commits
- For each commit, creates a commit message using conventional commit format
- 使用检查哪些文件有变更
sl status - 如果存在需要纳入的未跟踪文件,使用添加它们
sl add - 执行以了解待提交的变更内容
sl diff - 分析diff判断是否存在多个不同的逻辑变更
- 如果检测到多个不同的变更,建议将提交拆分为多个更小的提交
- 为每个提交生成符合约定式提交格式的提交信息
Commands to Use
可用命令
- - Check repository state
sl status - - View pending changes
sl diff - - Add untracked files
sl add <files> - - Create commit
sl commit -m "<message>"
- - 检查仓库状态
sl status - - 查看待处理变更
sl diff - - 添加未跟踪文件
sl add <files> - - 创建提交
sl commit -m "<message>"
Key Sapling Differences from Git
Sapling与Git的核心差异
- No staging area: Sapling commits all pending changes directly
- Amend with auto-restack: automatically rebases descendant commits
sl amend - Stacked Diffs: Each commit becomes a separate Phabricator diff
- 无暂存区:Sapling直接提交所有待处理变更
- 自动重基修改:会自动变基后代提交
sl amend - 堆叠Diff:每个提交都会成为单独的Phabricator diff
Sapling Commit Commands Reference
Sapling提交命令参考
| Command | Description |
|---|---|
| Create a new commit with message |
| Add untracked files and commit |
| Amend current commit (auto-rebases descendants) |
| Amend changes to a specific commit in stack |
| 命令 | 描述 |
|---|---|
| 使用指定信息创建新提交 |
| 添加未跟踪文件并提交 |
| 修改当前提交(自动变基后代提交) |
| 将变更修改到堆叠中指定的提交 |
Important Notes
重要注意事项
- Follow pre-commit checks if configured
- Keep commits small and focused - each becomes a separate Phabricator diff
- Use freely - Sapling handles rebasing automatically
sl amend - Attribute AI-assisted code authorship
- 如果配置了pre-commit检查,请遵守相关规则
- 保持提交小而聚焦——每个提交都会成为单独的Phabricator diff
- 可自由使用——Sapling会自动处理变基
sl amend - 标注AI辅助生成代码的作者归属