]> git.cworth.org Git - nogit/blobdiff - README
Fix emacs hook to not clobber match data
[nogit] / README
diff --git a/README b/README
index 9c4c43665fcb3d5fc36246992cd47e519186e99f..bae558f7e2e9283bf55694e1578fceadbf227c99 100644 (file)
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ nogit: Using git to track files without the user using git
 Summary
 =======
 Let's see, nogit is a very simple tool that uses git under the hood to
-allow for collaboration on files, but without requiring the the
+allow for collaboration on files, but without requiring the
 collaborators to invoke git commands. Any time a user might invoke
 "git commit", or "git push", or "git pull", etc. the user instead just
 invokes "nogit sync". And the user will not be prompted to fill out a
@@ -74,14 +74,16 @@ save it:
   ;       and recurse.
   (defun nogit-sync-if-configured ()
     (interactive)
-    (if (and
-        (buffer-file-name)
-         (file-exists-p (format "%s/../.nogit" (buffer-file-name)))
-         (not (boundp 'in-nogit-sync))
-         )
-        (let ((in-nogit-sync t))
-          (message (substring (shell-command-to-string "nogit sync") 0 -1))
-          (revert-buffer nil t)
+    (save-match-data
+      (if (and
+           (buffer-file-name)
+           (file-exists-p (format "%s/../.nogit" (buffer-file-name)))
+           (not (boundp 'in-nogit-sync))
+           )
+          (let ((in-nogit-sync t))
+           (message (substring (shell-command-to-string "nogit sync") 0 -1))
+            (revert-buffer nil t)
+            )
         )
       )
     )
@@ -95,28 +97,15 @@ save it:
 Preparing git repositories for use with nogit
 =============================================
 If you're interested in setting up a parent and child repository for
-use with nogit, here's what you'll want to do:
-
-    In the parent repository
-    ------------------------
-    Add the following to .gitignore:
-       .nogit
-       .gitattributes
-       Any files to be tracked in the child nogit repository
-
-    For the child repository
-    ------------------------
-    Create a new git repository
-    Add the files to be tracked via nogit
-    Add a .gitattributes file with contents such as:
-
-       * merge=union
-
-    The * is a pattern to match the files you're tracking. You don't
-    necessarily need to use '*' you can explicitly name the files of
-    interest. But the important thing is that all files tracked by
-    nogit use the "union" merge driver (so that merges don't result in
-    conflicts requiring user intervention).
+use with nogit, there's almost nothing to it. In the child repository,
+just put all of the files you want to be treated with nogit's
+semantics. You don't need to fiddle with any .gitattributes or
+merge=union configuration. The nogit clone will do everything
+necessary for you so you get those semantics.
+
+Then, in the parent repository, you'll simply want to augment your
+.gitignore file to ignore all nogit-managed files from the child
+repository as well as the ".nogit" directory itself.
 
 Motivation
 ==========