10. Advanced Tools

13 thẻ

Review deck này
Tất cả thẻ trong deck

`git bisect start`

bắt đầu session

`git bisect bad HEAD`

đánh dấu commit hiện tại là xấu

`git bisect good v1.0.0`

đánh dấu commit tốt đã biết

`git bisect run ./test.sh`

tự động hóa (exit 0 = good; 1–127 trừ 125 = bad; 125 = skip commit; mã khác thì dừng bisect)

`git bisect reset`

kết thúc, quay về HEAD

`git cherry-pick <hash>`

áp dụng một commit

`git cherry-pick A^..B`

áp dụng range từ A đến B inclusive

`git cherry-pick --no-commit <hash>`

chỉ stage, không commit

`git worktree add <path> <branch>`

tạo working directory thứ hai

`git worktree list`

liệt kê worktrees

`git worktree remove <path>`

xoá worktree

Submodule

`.gitmodules`, cần `git submodule init && update`, tách biệt rõ ràng

Subtree

không cần file config, lịch sử lẫn vào nhau, `git subtree add/pull/push`

10. Advanced Tools – Flashcards – Git | Học Dev