git-workflows
bởi gitgoodordietrying
Git & GitHubTóm tắt
Advanced git operations beyond add/commit/push.
Mô tả
Kỹ năng này làm gì
Covers advanced git operations beyond the basics: interactive rebase, bisect, worktrees, reflog recovery, subtrees, submodules, sparse checkout, conflict resolution, and cherry-picking. Aimed at developers who need precise control over commit history and multi-branch workflows.
Covers the full range of recovery and history-rewriting operations that most git tutorials skip, including automated bisect and rerere, which eliminate repetitive manual steps.
Khi nào nên dùng
- Squashing fix commits before merging a PR
- Pinpointing which commit introduced a regression
- Reviewing a PR in a separate worktree without stashing current work
- Recovering commits after an accidental reset --hard
- Syncing a shared library into a repo via subtree
Quy trình ví dụ
User asks: find which commit broke the login redirect test
- 1
Run
git bisect startand mark current HEAD as bad - 2
Mark a known-good tag or commit with
git bisect good v1.2.0 - 3
Write a test script that exits 0 when the bug is absent and 1 when present
- 4
Run
git bisect run ./test-for-bug.shto automate binary search - 5
Review the identified bad commit with
git showand reset withgit bisect reset
Git identifies the exact commit SHA that introduced the regression
Cài đặt
clawhub install gitgoodordietrying/git-workflowsChạy lệnh CLI, hoặc dán prompt vào Claude Code, Cursor, Codex hay coding agent bạn đang dùng.