push
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGit Push Skill
Git Push 技能
Automates Git workflow to save your notes with meaningful commit messages and push to remote repository.
自动化Git工作流,使用有意义的提交信息保存笔记并推送到远程仓库。
Usage
使用方法
Invoke with or ask Claude to save/commit your changes.
/push通过指令调用,或让Claude保存/提交你的变更。
/pushBasic Usage
基础用法
/push/pushWith Custom Message
自定义提交信息
/push "Completed project planning"/push "完成项目规划"What This Skill Does
该技能的功能
-
Stages All Changes
- Adds all modified files
- Includes new files
- Removes deleted files
-
Creates Smart Commit Message
- Uses provided message, or
- Auto-generates from changes
- Includes date/time stamp
- Summarizes key modifications
-
Syncs with Remote
- Pulls latest changes (if enabled)
- Pushes to remote repository
- Handles merge conflicts gracefully
-
暂存所有变更
- 添加所有已修改文件
- 包含新增文件
- 移除已删除文件
-
生成智能提交信息
- 使用提供的自定义信息,或
- 根据变更自动生成
- 包含日期/时间戳
- 总结关键修改内容
-
与远程仓库同步
- 拉取最新变更(若启用)
- 推送到远程仓库
- 优雅处理合并冲突
Commit Message Format
提交信息格式
Automatic Messages
自动生成的信息
Based on your changes:
Daily note for 2024-01-15 + 3 project updates
- Added: Daily Notes/2024-01-15.md
- Modified: Projects/Learning Spanish/notes.md
- Modified: Goals/2. Monthly Goals.md基于你的变更内容:
Daily note for 2024-01-15 + 3 project updates
- Added: Daily Notes/2024-01-15.md
- Modified: Projects/Learning Spanish/notes.md
- Modified: Goals/2. Monthly Goals.mdWith Timestamp
带时间戳的格式
[2024-01-15 09:30] Completed weekly review[2024-01-15 09:30] Completed weekly reviewWorkflow Integration
工作流集成
Morning Routine
晨间流程
/daily # Create daily note/daily # 创建每日笔记... work on notes ...
... 编辑笔记 ...
/push "Morning planning complete"
undefined/push "晨间规划完成"
undefinedEnd of Day
每日收尾
undefinedundefinedComplete daily reflection
完成每日复盘
/push # Auto-message with summary
undefined/push # 自动生成包含总结的提交信息
undefinedAfter Weekly Review
周复盘后
/weekly # Run weekly review
/push "Weekly review - Week 3"/weekly # 执行周复盘
/push "周复盘 - 第3周"Git Operations
Git操作流程
Standard Flow
标准流程
- - Stage all changes
git add . - - Create commit
git commit -m "message" - - Get remote changes
git pull --rebase origin main - - Push to remote
git push origin main
- - 暂存所有变更
git add . - - 创建提交
git commit -m "message" - - 获取远程变更
git pull --rebase origin main - - 推送到远程
git push origin main
Safety Checks
安全检查
- Verify Git repository exists
- Check for uncommitted changes
- Ensure remote is configured
- Validate branch exists
- 验证Git仓库是否存在
- 检查是否有未提交的变更
- 确保已配置远程仓库
- 验证分支是否存在
Conflict Handling
冲突处理
If conflicts occur:
- Auto-resolve attempts (favor local for notes)
- If manual resolution needed, guide through process
- Never force push without explicit request
若发生冲突:
- 尝试自动解决(笔记类文件优先保留本地版本)
- 若需要手动解决,将引导你完成流程
- 未经明确请求,绝不会强制推送
Security Considerations
安全注意事项
Never Commit
切勿提交
- Passwords or credentials
- API keys
- Personal identification
- Financial information
- 密码或凭证
- API密钥
- 个人身份信息
- 财务信息
Use .gitignore for
建议加入.gitignore的内容
private/
credentials.md
.env
.obsidian/workspace*
.obsidian/cache
.trash/
.DS_Storeprivate/
credentials.md
.env
.obsidian/workspace*
.obsidian/cache
.trash/
.DS_StoreTroubleshooting
故障排查
Push Rejected?
推送被拒绝?
Pull first, then push again:
bash
git pull --rebase origin main
git push origin main先拉取远程变更,再重新推送:
bash
git pull --rebase origin main
git push origin mainNot a Git Repository?
不是Git仓库?
bash
git init
git remote add origin [URL]bash
git init
git remote add origin [URL]Large Files Issue?
大文件问题?
Consider Git LFS for images/attachments.
可考虑使用Git LFS处理图片/附件。
Integration
集成兼容性
Works with:
- - Commit after creating daily note
/daily - - Commit after weekly review
/weekly - - No git needed for context loading
/onboard - Auto-commit hook for automatic saves
可与以下功能配合使用:
- - 创建每日笔记后提交
/daily - - 完成周复盘后提交
/weekly - - 加载上下文无需Git
/onboard - 自动提交钩子实现自动保存