|
57 | 57 | * [Retrieve the commit hash of the initial revision.](https://github.com/git-tips/tips#retrieve-the-commit-hash-of-the-initial-revision) |
58 | 58 | * [Visualize the version tree.](https://github.com/git-tips/tips#visualize-the-version-tree) |
59 | 59 | * [Deploying git tracked subfolder to gh-pages](https://github.com/git-tips/tips#deploying-git-tracked-subfolder-to-gh-pages) |
60 | | -* [Adding a project to repo using subtree. For example we are adding in vendor directory](https://github.com/git-tips/tips#adding-a-project-to-repo-using-subtree-for-example-we-are-adding-in-vendor-directory) |
61 | | -* [Get latest changes in your repo for a linked subproject using subtree. For example we have the subproject in vendor directory](https://github.com/git-tips/tips#get-latest-changes-in-your-repo-for-a-linked-subproject-using-subtree-for-example-we-have-the-subproject-in-vendor-directory) |
| 60 | +* [Adding a project to repo using subtree](https://github.com/git-tips/tips#adding-a-project-to-repo-using-subtree) |
| 61 | +* [Get latest changes in your repo for a linked project using subtree](https://github.com/git-tips/tips#get-latest-changes-in-your-repo-for-a-linked-project-using-subtree) |
62 | 62 |
|
63 | 63 | <!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. --> |
64 | 64 | <!-- @doxie.inject end toc --> |
@@ -409,14 +409,14 @@ gitk --all |
409 | 409 | git subtree push --prefix subfolder_name origin gh-pages |
410 | 410 | ``` |
411 | 411 |
|
412 | | -## Adding a project to repo using subtree. For example we are adding in vendor directory |
| 412 | +## Adding a project to repo using subtree |
413 | 413 | ```sh |
414 | | -git subtree add --prefix=vendor/<project_name> --squash git@github.com:<username>/<project_name>.git master |
| 414 | +git subtree add --prefix=<directory_name>/<project_name> --squash git@github.com:<username>/<project_name>.git master |
415 | 415 | ``` |
416 | 416 |
|
417 | | -## Get latest changes in your repo for a linked subproject using subtree. For example we have the subproject in vendor directory |
| 417 | +## Get latest changes in your repo for a linked project using subtree |
418 | 418 | ```sh |
419 | | -git subtree pull --prefix=vendor/<project_name> --squash git@github.com:<username>/<project_name>.git master |
| 419 | +git subtree pull --prefix=<directory_name>/<project_name> --squash git@github.com:<username>/<project_name>.git master |
420 | 420 | ``` |
421 | 421 |
|
422 | 422 | <!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. --> |
|
0 commit comments