Help tips around git worktree one of git 2.5 features

This commit is contained in:
Samar Panda 2015-07-31 03:52:44 +05:30
parent 328e594513
commit de65ecb886
2 changed files with 20 additions and 0 deletions

View File

@ -39,6 +39,8 @@
* [Show all tracked files](https://github.com/git-tips/tips#show-all-tracked-files)
* [Show all untracked files](https://github.com/git-tips/tips#show-all-untracked-files)
* [Show all ignored files](https://github.com/git-tips/tips#show-all-ignored-files)
* [Create new working tree from a repository (git 2.5)](https://github.com/git-tips/tips#create-new-working-tree-from-a-repository-git-25)
* [Create new working tree from HEAD state](https://github.com/git-tips/tips#create-new-working-tree-from-head-state)
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
@ -257,5 +259,15 @@ git ls-files --others
git ls-files --others -i --exclude-standard
```
## Create new working tree from a repository (git 2.5)
```sh
git worktree add -b <branch-name> <path> <start-point>
```
## Create new working tree from HEAD state
```sh
git worktree add --detach <path> HEAD
```
<!-- Dont remove or change the comment below that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->

View File

@ -147,5 +147,13 @@
{
"title": "Show all ignored files",
"tip": "git ls-files --others -i --exclude-standard"
},
{
"title": "Create new working tree from a repository (git 2.5)",
"tip":"git worktree add -b <branch-name> <path> <start-point>"
},
{
"title": "Create new working tree from HEAD state",
"tip": "git worktree add --detach <path> HEAD"
}
]