From fb185ba641fb97a27af6e4ed90000c040bc5dea6 Mon Sep 17 00:00:00 2001 From: Spark Date: Thu, 5 Jan 2017 14:53:50 -0500 Subject: [PATCH 1/5] Create git-worktree.md --- pages/common/git-worktree.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/git-worktree.md diff --git a/pages/common/git-worktree.md b/pages/common/git-worktree.md new file mode 100644 index 0000000000000..e041c92afc5cb --- /dev/null +++ b/pages/common/git-worktree.md @@ -0,0 +1,15 @@ +# git worktree + +> Manage multiple working trees attached to the same repository. + +- Create a new folder with the specified branch checked out into it: + +`git worktree add {{path}} {{branch}}` + +- List all the working directories attached to this repo: + +`git worktree list` + +- Create a new folder with a new branch checked out into it: + +`git worktree add -b {{new_branch}} {{path}}` From 3f3848d62d3942a570952c4e5eb43c6918958905 Mon Sep 17 00:00:00 2001 From: Spark Date: Thu, 5 Jan 2017 15:09:36 -0500 Subject: [PATCH 2/5] Removed whitespace to pass Travis CI check --- pages/common/git-worktree.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/common/git-worktree.md b/pages/common/git-worktree.md index e041c92afc5cb..890b7f851e47d 100644 --- a/pages/common/git-worktree.md +++ b/pages/common/git-worktree.md @@ -1,15 +1,15 @@ -# git worktree +# git worktree -> Manage multiple working trees attached to the same repository. +> Manage multiple working trees attached to the same repository. -- Create a new folder with the specified branch checked out into it: +- Create a new folder with the specified branch checked out into it: -`git worktree add {{path}} {{branch}}` +`git worktree add {{path}} {{branch}}` -- List all the working directories attached to this repo: +- List all the working directories attached to this repo: -`git worktree list` +`git worktree list` -- Create a new folder with a new branch checked out into it: +- Create a new folder with a new branch checked out into it: -`git worktree add -b {{new_branch}} {{path}}` +`git worktree add -b {{new_branch}} {{path}}` From 648cff48560737a2bf28886f87a2c8f7b79b339f Mon Sep 17 00:00:00 2001 From: Spark Date: Thu, 5 Jan 2017 18:53:23 -0500 Subject: [PATCH 3/5] Changed wording per comments --- pages/common/git-worktree.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/common/git-worktree.md b/pages/common/git-worktree.md index 890b7f851e47d..7a2a557f4854a 100644 --- a/pages/common/git-worktree.md +++ b/pages/common/git-worktree.md @@ -4,12 +4,12 @@ - Create a new folder with the specified branch checked out into it: -`git worktree add {{path}} {{branch}}` +`git worktree add {{path/to/folder}} {{branch}}` -- List all the working directories attached to this repo: +- List all the working directories attached to this repository: `git worktree list` - Create a new folder with a new branch checked out into it: -`git worktree add -b {{new_branch}} {{path}}` +`git worktree add -b {{new_branch}} {{path/to/folder}}` From 5ef9ad802f95c4c40598ccad63f4a9c0988ece33 Mon Sep 17 00:00:00 2001 From: Spark Date: Sun, 8 Jan 2017 13:37:25 -0500 Subject: [PATCH 4/5] Add git worktree prune. Reorder commands --- pages/common/git-worktree.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/common/git-worktree.md b/pages/common/git-worktree.md index 7a2a557f4854a..2a1e980c8e0d8 100644 --- a/pages/common/git-worktree.md +++ b/pages/common/git-worktree.md @@ -6,10 +6,14 @@ `git worktree add {{path/to/folder}} {{branch}}` +- Create a new folder with a new branch checked out into it: + +`git worktree add {{path/to/folder}} -b {{new_branch}}` + - List all the working directories attached to this repository: `git worktree list` -- Create a new folder with a new branch checked out into it: +- Remove a worktree (after deleting worktree folder): -`git worktree add -b {{new_branch}} {{path/to/folder}}` +`git worktree prune` From cc8766ba6febb4604b1851ffb83dd9c513d9f018 Mon Sep 17 00:00:00 2001 From: Spark Date: Sun, 8 Jan 2017 13:39:14 -0500 Subject: [PATCH 5/5] Deleted trailing space --- pages/common/git-worktree.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/common/git-worktree.md b/pages/common/git-worktree.md index 2a1e980c8e0d8..016eed97c8a98 100644 --- a/pages/common/git-worktree.md +++ b/pages/common/git-worktree.md @@ -14,6 +14,6 @@ `git worktree list` -- Remove a worktree (after deleting worktree folder): +- Remove a worktree (after deleting worktree folder): `git worktree prune`