File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 3939* [ Show all tracked files] ( https://github.com/git-tips/tips#show-all-tracked-files )
4040* [ Show all untracked files] ( https://github.com/git-tips/tips#show-all-untracked-files )
4141* [ Show all ignored files] ( https://github.com/git-tips/tips#show-all-ignored-files )
42+ * [ 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 )
43+ * [ Create new working tree from HEAD state] ( https://github.com/git-tips/tips#create-new-working-tree-from-head-state )
4244
4345<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
4446<!-- @doxie.inject end toc -->
@@ -257,5 +259,15 @@ git ls-files --others
257259git ls-files --others -i --exclude-standard
258260```
259261
262+ ## Create new working tree from a repository (git 2.5)
263+ ``` sh
264+ git worktree add -b < branch-name> < path> < start-point>
265+ ```
266+
267+ ## Create new working tree from HEAD state
268+ ``` sh
269+ git worktree add --detach < path> HEAD
270+ ```
271+
260272<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
261273<!-- @doxie.inject end -->
Original file line number Diff line number Diff line change 147147 {
148148 "title" : " Show all ignored files" ,
149149 "tip" : " git ls-files --others -i --exclude-standard"
150+ },
151+ {
152+ "title" : " Create new working tree from a repository (git 2.5)" ,
153+ "tip" :" git worktree add -b <branch-name> <path> <start-point>"
154+ },
155+ {
156+ "title" : " Create new working tree from HEAD state" ,
157+ "tip" : " git worktree add --detach <path> HEAD"
150158 }
151159]
You can’t perform that action at this time.
0 commit comments