Buscar..
Sintaxis
-
git subtree add -P <prefix> <commit> -
git subtree add -P <prefix> <repository> <ref> -
git subtree pull -P <prefix> <repository> <ref> -
git subtree push -P <prefix> <repository> <ref> -
git subtree merge -P <prefix> <commit> -
git subtree split -P <prefix> [OPTIONS] [<commit>]
Observaciones
Esta es una alternativa al uso de un submodule
Crear, tirar, y Backport Subtree
Crear subárbol
Agregue un nuevo control remoto llamado plugin apunta al repositorio de plugins:
git remote add plugin https://path.to/remotes/plugin.git
Luego cree un subárbol que especifique los nuevos plugins/demo prefijo de carpeta. plugin es el nombre remoto, y master refiere a la rama maestra en el repositorio del subárbol:
git subtree add --prefix=plugins/demo plugin master
Actualizaciones del subárbol
Tire de las confirmaciones normales hechas en el plugin:
git subtree pull --prefix=plugins/demo plugin master
Actualizaciones de Backport Subtree
Especifique las confirmaciones realizadas en el superproyecto a ser portadas hacia atrás:
git commit -am "new changes to be backported"Verifique la nueva rama para fusionar, configurada para rastrear el repositorio de subárbol:
git checkout -b backport plugin/masterBackports Cherry-pick:
git cherry-pick -x --strategy=subtree masterEmpuje los cambios de nuevo a la fuente del complemento:
git push plugin backport:master
Modified text is an extract of the original Stack Overflow Documentation
Licenciado bajo CC BY-SA 3.0
No afiliado a Stack Overflow