From: Carl Worth Date: Sun, 5 Jul 2020 06:56:18 +0000 (-0700) Subject: README: Expand on the documentation for nogit X-Git-Url: https://git.cworth.org/git?p=nogit;a=commitdiff_plain;h=6e84162358f7bd36bbe093a8deae2cc8aa0b7bcd README: Expand on the documentation for nogit Providing more details on how to get setup with an existing nogit-tracked repository or even how to create a new one. --- diff --git a/README b/README index 29624ed..95ea89d 100644 --- 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 ==========