{"id":14007994,"url":"https://github.com/ryuslash/git-auto-commit-mode","last_synced_at":"2025-04-22T17:16:51.870Z","repository":{"id":2764748,"uuid":"3763086","full_name":"ryuslash/git-auto-commit-mode","owner":"ryuslash","description":"Automatically commit to git after each save","archived":false,"fork":false,"pushed_at":"2022-12-07T16:48:20.000Z","size":57,"stargazers_count":172,"open_issues_count":8,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-22T17:16:47.275Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://projects.ryuslash.org/git-auto-commit-mode/","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryuslash.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-03-19T11:18:48.000Z","updated_at":"2025-01-09T12:47:13.000Z","dependencies_parsed_at":"2023-01-11T16:12:20.752Z","dependency_job_id":null,"html_url":"https://github.com/ryuslash/git-auto-commit-mode","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuslash%2Fgit-auto-commit-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuslash%2Fgit-auto-commit-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuslash%2Fgit-auto-commit-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryuslash%2Fgit-auto-commit-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryuslash","download_url":"https://codeload.github.com/ryuslash/git-auto-commit-mode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250285731,"owners_count":21405298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-10T11:01:08.557Z","updated_at":"2025-04-22T17:16:51.844Z","avatar_url":"https://github.com/ryuslash.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"#+TITLE: git-auto-commit-mode\n#+STARTUP: showall\n\n* NAME\n\n  git-auto-commit-mode - Emacs minor mode to automatically commit (and\n  push) a git repository.\n\n  [[http://melpa.org/#/git-auto-commit-mode][file:http://melpa.org/packages/git-auto-commit-mode-badge.svg]]\n  [[http://stable.melpa.org/#/git-auto-commit-mode][file:http://stable.melpa.org/packages/git-auto-commit-mode-badge.svg]]\n\n* SYNOPSIS\n\n  =M-x git-auto-commit-mode \u003cRET\u003e=\n\n* DESCRIPTION\n\n  git-auto-commit-mode is an Emacs minor mode that tries to commit\n  changes to a file after every save.\n\n  The commit message sent to git is always the filename of the file\n  saved, relative to the root of the git repository.\n\n* USAGE\n\n  When enabled, git-auto-commit-mode uses the =after-save-hook= to\n  commit changes to git each time. If =gac-automatically-push-p= is\n  non-nil it also tries to push the ~HEAD~ to the current upstream.\n  Making sure that upstream is properly set is the responsibility of\n  the user.\n\n** Enabling\n\n   Since git-auto-commit-mode is a regular minor mode you have more\n   than one option to enable it.\n\n*** As a file-local variable\n\n    If you're using Emacs 24 or newer you should set an =eval=\n    file-local variable:\n    #+BEGIN_EXAMPLE\n      ;; -*- eval: (git-auto-commit-mode 1) -*-\n    #+END_EXAMPLE\n\n    If you're using an older version of Emacs, that should be:\n    #+BEGIN_EXAMPLE\n      ;; -*- mode: git-auto-commit -*-\n    #+END_EXAMPLE\n\n*** As a directory-local variable\n\n    Create a ~.dir-locals.el~ file in the directory where you want\n    git-auto-commit-mode to be enabled. This will also apply to any\n    subdirectories, so be careful. For more information see the [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables][Per-Directory\n    Local Variables]] section in the Emacs manual. Then put one of the following\n    snippets of code in there:\n\n    If you're using Emacs 24 or newer you should set an =eval= variable:\n    #+BEGIN_EXAMPLE\n      ((nil . ((eval git-auto-commit-mode 1))))\n    #+END_EXAMPLE\n\n    If you're using an older version of Emacs, that should be:\n    #+BEGIN_EXAMPLE\n      ((nil . ((mode . git-auto-commit))))\n    #+END_EXAMPLE\n\n*** As a hook\n\n    To enable git-auto-commit-mode each time a ~certain-hook~ runs:\n    #+BEGIN_EXAMPLE\n      (add-hook 'certain-hook 'git-auto-commit-mode)\n    #+END_EXAMPLE\n\n* CUSTOMIZATION\n\n  git-auto-commit-mode is a simple mode, as such it offers little\n  customization.\n\n  - =gac-automatically-push-p= ::\n    A boolean value indicating whether or not git-auto-commit-mode should try to\n    push the git repository's ~HEAD~ to its default upstream. Setting up the\n    upstream is the user's responsibility.\n\n  - =gac-automatically-add-new-files-p= ::\n    A boolean value indicating whether or not git-auto-commit-mode should add\n    new (untracked) files to the repository.\n\n  - =gac-ask-for-summary-p= ::\n    A boolean value indicating whether or not git-auto-commit-mode should ask\n    the user for a commit message every time a commit is made. *Note*: Since the\n    summary is asked for before the commit, but /after/ the file has been saved,\n    pressing ~C-g~ while entering the Summary will stop the commit from being\n    made, but not the file from being saved.\n\n  - =gac-shell-and= ::\n    A string that can be used to change how the shell combines commands. The\n    default \" \u0026\u0026 \" is good for bash-like shells, but \" ; and \" would be used for\n    fish, for example.\n\n  - =gac-debounce-interval= ::\n    A number specifying a buffer between automatic commits in seconds. Wait with\n    making an actual commit until this number of seconds elapses.\n\n  - =gac-add-additional-flag= ::\n    A string that can be used to add additional command line flags to the ~git\n    add~ command.\n\n  - =gac-commit-additional-flag= ::\n    A string that can be used to add additional command line flags to the ~git\n    commit~ command.\n\n  - =gac-silent-message-p= ::\n    A boolean value indicating whether to display the commit summary message,\n    which is usually displayed in the minibuffer. The default is ~nil~, meaning\n    that the summary would be displayed on every commit.\n\n\n  To set any of these options, you can:\n\n  - Use the customization interface (~M-x customize-group git-auto-commit-mode~).\n  - Set the defaults in your Emacs initialization file using:\n    #+begin_src emacs-lisp\n      (setq-default gac-ask-for-summary-p t)\n    #+end_src\n  - Set values in a hook:\n    #+begin_src emacs-lisp\n      (defun set-my-settings ()\n        (setq gac-automatically-push-p t))\n\n      (add-hook 'org-mode-hook 'set-my-settings)\n    #+end_src\n  - Set values in a ~.dir-locals.el~ (see [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html#Directory-Variables][Per-Directory Local Variables]]):\n    #+begin_src emacs-lisp\n      ((nil . ((gac-shell-and . \" ; and \"))))\n    #+end_src\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryuslash%2Fgit-auto-commit-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryuslash%2Fgit-auto-commit-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryuslash%2Fgit-auto-commit-mode/lists"}