diff options
author | Tom Willemsen | 2013-04-09 01:40:40 +0200 |
---|---|---|
committer | Tom Willemsen | 2013-04-09 01:59:51 +0200 |
commit | 060aba187d1df63bf273f87531f067588475852d (patch) | |
tree | a282672ebb963358d810cfd94863b37e3972a2d5 | |
parent | 8eb92a7870032cde62f1e15fb9b78b48abbcb2fd (diff) | |
download | git-auto-commit-mode-060aba187d1df63bf273f87531f067588475852d.tar.gz git-auto-commit-mode-060aba187d1df63bf273f87531f067588475852d.zip |
Add README
-rw-r--r-- | README.org | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/README.org b/README.org new file mode 100644 index 0000000..ddd6e69 --- /dev/null +++ b/README.org @@ -0,0 +1,74 @@ +#+TITLE: git-auto-commit-mode +#+STARTUP: showall + +* NAME + + git-auto-commit-mode - Emacs minor mode to automatically commit (and + push) a git repository. + +* SYNOPSIS + + =M-x git-auto-commit-mode <RET>= + +* DESCRIPTION + + git-auto-commit-mode is an Emacs minor mode that tries to commit + changes to a file after every save. + + The commit message sent to git is always the filename of the file + saved, relative to the root of the git repository. + +* USAGE + + When enabled, git-auto-commit-mode uses the =after-save-hook= to + commit changes to git each time. If =gac-automatically-push-p= is + non-nil it also tries to push the ~HEAD~ to the current upstream. + Making sure that upstream is properly set is the responsibility of + the user. + +** Enabling + + Since git-auto-commit-mode is a regular minor mode you have more + than one option to enable it. + +*** As a file-local variable + + If you're using Emacs 24 or newer you should set an =eval= + file-local variable: + #+BEGIN_EXAMPLE + ;; -*- eval: (git-auto-commit-mode 1) -*- + #+END_EXAMPLE + + If you're using an older version of Emacs, that should be: + #+BEGIN_EXAMPLE + ;; -*- mode: git-auto-commit -*- + #+END_EXAMPLE + +*** As a directory-local variable + + If you're using Emacs 24 or newer you should set an =eval= variable: + #+BEGIN_EXAMPLE + ((nil . ((eval git-auto-commit-mode 1)))) + #+END_EXAMPLE + + If you're using an older version of Emacs, that should be: + #+BEGIN_EXAMPLE + ((nil . ((mode . git-auto-commit)))) + #+END_EXAMPLE + +*** As a hook + + To enable git-auto-commit-mode each time a ~certain-hook~ runs: + #+BEGIN_EXAMPLE + (add-hook 'certain-hook 'git-auto-commit-mode) + #+END_EXAMPLE + +* CUSTOMIZATION + + git-auto-commit-mode is a simple mode, as such it offers little + customization. + + - =gac-automatically-push-p= :: A boolean value indicating whether or + not git-auto-commit-mode should try to push the git + repository's ~HEAD~ to its default upstream. Setting up the + upstream is the user's responsibility. |