Re: [PATCH v2 07/23] Documentation/git-worktree: add EXAMPLES section

2015-07-03 Thread Eric Sunshine
On Fri, Jul 3, 2015 at 8:17 PM, Eric Sunshine sunsh...@sunshineco.com wrote:
 Signed-off-by: Eric Sunshine sunsh...@sunshineco.com
 ---
 +EXAMPLES
 +
 +You are middle of a refactoring session and your boss comes in and demands

s/middle/in the /

 +that you fix something immediately. You might typically use
 +linkgit:git-stash[1] to store your changes away temporarily, however, your
 +worktree is in such a state of disarray (with new, removed, moved files,
 +and other bits and pieces strewn around) that you don't want to risk
 +disturbing any of it. Instead, you create a temporary linked worktree to
 +make the emergency fix, remove it when done, and then resume your earlier
 +refactoring session.
 +
 +
 +$ git branch emergency-fix master
 +$ git checkout --to ../temp emergency-fix
 +$ pushd ../temp
 +# ... hack hack hack ...
 +$ git commit -a -m 'emergency fix for boss'
 +$ popd
 +$ rm -rf ../temp
 +$ git worktree prune
 +
 +
  BUGS
  
  Multiple checkout support for submodules is incomplete. It is NOT
 --
 2.5.0.rc1.197.g417e668
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 07/23] Documentation/git-worktree: add EXAMPLES section

2015-07-03 Thread Eric Sunshine
Signed-off-by: Eric Sunshine sunsh...@sunshineco.com
---
 Documentation/git-worktree.txt | 22 ++
 1 file changed, 22 insertions(+)

diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt
index 410f0b4..028bbd9 100644
--- a/Documentation/git-worktree.txt
+++ b/Documentation/git-worktree.txt
@@ -105,6 +105,28 @@ to `/path/main/.git/worktrees/test-next` then a file named
 `test-next` entry from being pruned.  See
 linkgit:gitrepository-layout[5] for details.
 
+EXAMPLES
+
+You are middle of a refactoring session and your boss comes in and demands
+that you fix something immediately. You might typically use
+linkgit:git-stash[1] to store your changes away temporarily, however, your
+worktree is in such a state of disarray (with new, removed, moved files,
+and other bits and pieces strewn around) that you don't want to risk
+disturbing any of it. Instead, you create a temporary linked worktree to
+make the emergency fix, remove it when done, and then resume your earlier
+refactoring session.
+
+
+$ git branch emergency-fix master
+$ git checkout --to ../temp emergency-fix
+$ pushd ../temp
+# ... hack hack hack ...
+$ git commit -a -m 'emergency fix for boss'
+$ popd
+$ rm -rf ../temp
+$ git worktree prune
+
+
 BUGS
 
 Multiple checkout support for submodules is incomplete. It is NOT
-- 
2.5.0.rc1.197.g417e668

--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html