İleri Seviye Git
Amanda Crawford-Adamo
Software and Data Engineer
Git Worktree Komutu
git worktree

Bu tablo, geliştirme iş akışında git worktree ile git switch kullanımını karşılaştırır. $$
| Git Worktree | Git Switch |
|---|---|
| Birden çok etkin dal | Aynı anda tek etkin dal |
| Ayrı dizinler | Tek çalışma dizini |
| Stash gerekmez | Stash gerekebilir |
<branch> dalından <path> dizinine yeni worktree oluşturun
git worktree add <path> <branch>
Örnek
bugfix/data-validation dalından ../etl-bugfix dizinine yeni bir worktree oluşturun
git worktree add ../etl-bugfix bugfix/data-validation
git worktree list Örnek çıktı
$ git worktree list
flight-pipeline a1b2c3d [main]
flight-pipeline-feature e4f5g6h [feature]
flight-pipeline-hotfix i7j8k9l [hotfix]
git worktree remove <path> Örnek çıktı
$ git worktree remove flight-pipeline-hotfix
flight-pipeline-hotfix: deleted
Ne zaman kullanılır:
Yeniden düşünün:
Git worktree kullanırken şu ipuçlarını dikkate alın:
İleri Seviye Git