Các lệnh bạn mô tả đọc một cây con vào một kho lưu trữ. Lệnh git-subtree
có nhiều lựa chọn hơn, như được mô tả bởi the documentation. Trong số những người khác, bạn có thể (chú thích vì đơn giản):
add::
Create the <prefix> subtree by importing its contents
from the given <refspec> or <repository> and remote <refspec>.
merge::
Merge recent changes up to <commit> into the <prefix>
subtree.
pull::
Exactly like 'merge', but parallels 'git pull' in that
it fetches the given commit from the specified remote
repository.
push::
Does a 'split' (see above) using the <prefix> supplied
and then does a 'git push' to push the result to the
repository and refspec. This can be used to push your
subtree to different branches of the remote repository.
split::
Extract a new, synthetic project history from the
history of the <prefix> subtree. The new history
includes only the commits (including merges) that
affected <prefix>, and each of those commits now has the
contents of <prefix> at the root of the project instead
of in a subdirectory. Thus, the newly created history
is suitable for export as a separate git repository.
Ngoài ra còn có nhiều loại cờ mà viện trợ và thao tác trên. Tôi tin rằng tất cả các tùy chọn này đã có sẵn trước khi thông qua các chuỗi lệnh ống nước. git-subtree.sh
chỉ cần kết thúc chúng và làm cho chúng dễ thực thi hơn.