mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 14:22:07 +02:00

* git subtree: make language inclusive * git revert: make language inclusive * git rev-list: make language inclusive * git request-pull: make language inclusive * git rebase: make language inclusive * git revert/es: make language inclusive * git rev-list/es: make language inclusive * git rebase/es: make language inclusive * git-rebase/es: improve language Co-authored-by: Marco Bonelli <marco@mebeim.net> * git-rebase/es: improve language Co-authored-by: Axel Navarro <navarroaxel@gmail.com> * Update git-rebase.md * git-subtree: revise example description * git-rebase/es: translate branch_name Co-authored-by: Axel Navarro <navarroaxel@gmail.com> * Update git-rebase.md * Update git-rev-list.md * Update pages.es/common/git-revert.md Co-authored-by: Axel Navarro <navarroaxel@gmail.com> * Apply suggestions from code review Co-authored-by: Waldir Pimenta <waldyrious@gmail.com> Co-authored-by: Marco Bonelli <marco@mebeim.net> Co-authored-by: Axel Navarro <navarroaxel@gmail.com> Co-authored-by: Waldir Pimenta <waldyrious@gmail.com>
24 lines
883 B
Markdown
24 lines
883 B
Markdown
# git subtree
|
|
|
|
> Tool to manage project dependencies as subprojects.
|
|
> More information: <https://manpages.debian.org/testing/git-man/git-subtree.1.en.html>.
|
|
|
|
- Add a git repository as a subtree:
|
|
|
|
`git subtree add --prefix={{path/to/directory/}} --squash {{repository_url}} {{branch_name}}`
|
|
|
|
- Update subtree repository to its latest commit:
|
|
|
|
`git subtree pull --prefix={{path/to/directory/}} {{repository_url}} {{branch_name}}`
|
|
|
|
- Merge recent changes up to the latest subtree commit into the subtree:
|
|
|
|
`git subtree merge --prefix={{path/to/directory/}} --squash {{repository_url}} {{branch_name}}`
|
|
|
|
- Push commits to a subtree repository:
|
|
|
|
`git subtree push --prefix={{path/to/directory/}} {{repository_url}} {{branch_name}}`
|
|
|
|
- Extract a new project history from the history of a subtree:
|
|
|
|
`git subtree split --prefix={{path/to/directory/}} {{repository_url}} -b {{branch_name}}`
|