← Back to list

git-workflow
by octave-commons
A myth engine
⭐ 1🍴 0📅 Jan 25, 2026
SKILL.md
name: git-workflow description: Git workflow management including branching, commits, PRs, and conflict resolution license: MIT compatibility: opencode metadata: audience: all-developers vcs: git
What I do
- Create and manage Git branches for feature development
- Stage, commit, and amend changes with proper messages
- Resolve merge conflicts and rebase branches
- Create and manage pull requests via GitHub CLI
- Sync with remote repositories (push, pull, fetch)
- Inspect history and diagnose issues
When to use me
Use me when working with Git, especially when:
- Creating feature branches or hotfixes
- Committing changes with descriptive messages
- Resolving merge or rebase conflicts
- Managing pull requests and code reviews
- Syncing work with teammates
- Investigating issues in commit history
Common commands
git status- Show working tree statusgit diff- Show unstaged changesgit diff --staged- Show staged changesgit add .- Stage all changesgit commit -m "message"- Commit staged changesgit commit --amend- Modify last commitgit branch feature-name- Create branchgit checkout -b feature-name- Create and checkout branchgit checkout main- Switch to main branchgit merge feature-name- Merge branchgit rebase main- Rebase current branch onto maingit push -u origin feature-name- Push branch with upstreamgit pull --rebase- Pull with rebasegit log --oneline -10- Show last 10 commitsgit log -p --follow file- Show file history
Branching strategies
- Feature branches:
feature/feature-name - Bugfix branches:
bugfix/issue-description - Hotfix branches:
hotfix/critical-fix - Release branches:
release/version-number - Delete branch after merge:
git branch -d feature-name
Commit message conventions
- Use imperative mood: "Add feature" not "Added feature"
- Keep first line under 50 characters
- Leave blank line between summary and body
- Reference issues:
Closes #123orRefs #456 - Explain "why" not "what" in body
Conflict resolution
- Run
git statusto find conflicts - Open files with conflict markers (
<<<<<<<,=======,>>>>>>>) - Resolve by keeping desired code
- Mark resolved with
git add file - Complete merge/rebase
- Test thoroughly before committing
GitHub CLI patterns
gh pr create- Create pull requestgh pr list- List pull requestsgh pr view 123- View PR detailsgh pr merge 123- Merge PRgh issue list- List issuesgh repo clone org/repo- Clone repository
Rebasing vs merging
- Rebase: cleaner linear history, avoid for shared branches
- Merge: preserve branch history, safer for collaboration
- Interactive rebase:
git rebase -i HEAD~3to edit commits - Squash: combine multiple commits into one
Safety checks
- Check
git statusbefore destructive commands - Never force push to shared branches (
main,master) - Use
--dry-runflag with caution - Backup branches with tags before major operations
- Verify with
git reflogif you lose commits
Interactive operations
git add -p- Stage changes interactively (hunks)git commit -v- Show diff when committinggit rebase -i- Interactive rebase to edit/squash commitsgit clean -fd- Remove untracked files and directories (use with caution)git restore file- Discard changes in working directory
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon