mirror of https://github.com/namibia/tips.git
commit
199d6ff42e
18
README.md
18
README.md
|
@ -56,6 +56,9 @@
|
|||
* [Purnes branches that have been deleted in the remote.](https://github.com/git-tips/tips#purnes-branches-that-have-been-deleted-in-the-remote)
|
||||
* [Retrieve the commit hash of the initial revision.](https://github.com/git-tips/tips#retrieve-the-commit-hash-of-the-initial-revision)
|
||||
* [Visualize the version tree.](https://github.com/git-tips/tips#visualize-the-version-tree)
|
||||
* [Deploying git tracked subfolder to gh-pages](https://github.com/git-tips/tips#deploying-git-tracked-subfolder-to-gh-pages)
|
||||
* [Adding a project to repo using subtree](https://github.com/git-tips/tips#adding-a-project-to-repo-using-subtree)
|
||||
* [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)
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end toc -->
|
||||
|
@ -401,5 +404,20 @@ __Alternatives:__
|
|||
gitk --all
|
||||
```
|
||||
|
||||
## Deploying git tracked subfolder to gh-pages
|
||||
```sh
|
||||
git subtree push --prefix subfolder_name origin gh-pages
|
||||
```
|
||||
|
||||
## Adding a project to repo using subtree
|
||||
```sh
|
||||
git subtree add --prefix=<directory_name>/<project_name> --squash git@github.com:<username>/<project_name>.git master
|
||||
```
|
||||
|
||||
## Get latest changes in your repo for a linked project using subtree
|
||||
```sh
|
||||
git subtree pull --prefix=<directory_name>/<project_name> --squash git@github.com:<username>/<project_name>.git master
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
|
13
tips.json
13
tips.json
|
@ -222,5 +222,18 @@
|
|||
"title": "Visualize the version tree.",
|
||||
"tip": "git log --pretty=oneline --graph --decorate --all",
|
||||
"alternatives":["gitk --all"]
|
||||
},
|
||||
{
|
||||
"title": "Deploying git tracked subfolder to gh-pages",
|
||||
"tip": "git subtree push --prefix subfolder_name origin gh-pages",
|
||||
"alternatives": "git subtree push --prefix subfolder_name origin branch_name"
|
||||
},
|
||||
{
|
||||
"title": "Adding a project to repo using subtree",
|
||||
"tip": "git subtree add --prefix=<directory_name>/<project_name> --squash git@github.com:<username>/<project_name>.git master"
|
||||
},
|
||||
{
|
||||
"title": "Get latest changes in your repo for a linked project using subtree",
|
||||
"tip": "git subtree pull --prefix=<directory_name>/<project_name> --squash git@github.com:<username>/<project_name>.git master"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue