]> git.cworth.org Git - nogit/commitdiff
README: Expand on the documentation for nogit
authorCarl Worth <cworth@cworth.org>
Sun, 5 Jul 2020 06:56:18 +0000 (23:56 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 5 Jul 2020 06:56:18 +0000 (23:56 -0700)
Providing more details on how to get setup with an existing
nogit-tracked repository or even how to create a new one.

README

diff --git a/README b/README
index 29624edc0eb98ec43271f0aad8808cafe4d9a61a..95ea89db988439eb0aebb479e45029990a8e73d6 100644 (file)
--- a/README
+++ b/README
@@ -9,6 +9,56 @@ collaborators to invoke git commands. Any time a user might invoke
 invokes "nogit sync". And the user will not be prompted to fill out a
 commit message or to resolve conflicts, etc.
 
+Installation
+============
+The nogit implementation is a simple bash script named "nogit". To
+install it, simply copy it to a directory on your PATH. Or, if you'd
+like to be able to follow along with nogit changes from a git
+repository, you might create a symlink from a directory on your PATH
+to the nogit script in the git repostiory.
+
+Usage
+=====
+Presumably, you've been pointed to a repository which is intended to
+be used with nogit. These repositories are often paired with a
+"parent" repository that is being tracked with git. If so, the
+procedure for cloning should look something like this:
+
+       git clone /url/of/parent
+        cd parent
+        nogit clone /url/of/nogit/child
+
+And after that, you can run "nogit sync" whenever convenient, (when
+you've made changes or you think there might be upstream changes to
+the files being tracked in the nogit repository). Note that "nogit
+sync" should not ever ask for user input, so it's appropriate to call
+"nogit sync" from an autoamted system, (such as a text editor's hook
+when saving a file).
+
+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).
+
 Motivation
 ==========