mirror of
https://github.com/namibia/tips.git
synced 2024-09-28 05:39:00 +00:00
Help tips around git worktree one of git 2.5 features
This commit is contained in:
parent
328e594513
commit
de65ecb886
12
README.md
12
README.md
@ -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)
|
||||
|
||||
<!-- 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 -->
|
||||
@ -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
|
||||
```
|
||||
|
||||
<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
|
||||
<!-- @doxie.inject end -->
|
||||
|
@ -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"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user