https://github.com/tonini/gitconfig.el.git
git clone 'git://github.com/tonini/gitconfig.el.git'
Emacs lisp interface to work with git-config variables
gitconfig.el is available on both community maintained repositories -
Marmalade and
MELPA. Just run M-x package-install
[RET] gitconfig [RET]
inside your emacs and you're ready to go.
If you're not already using ELPA, check the emacswiki page to get familiar with it.
(add-to-list 'load-path "~/path/to/gitconfig.el/")
(require 'gitconfig)
Command (For the M-x prompt.) |
Description |
---|---|
gitconfig-execute-command |
Run git config with custom ARGUMENTS and display it in
the gitconfig-buffer-name |
Function | Description |
---|---|
(gitconfig-current-inside-git-repository-p) |
Return t if default-directory is a git repository |
(gitconfig-path-to-git-repository) |
Return the absolute path of the current git repository |
(gitconfig-get-variables LOCATION) |
Get all variables for the given LOCATION and return it as a hash table |
(gitconfig-set-variable LOCATION NAME VALUE) |
Set a specific LOCATION variable with a given NAME and VALUE |
(gitconfig-get-variable LOCATION NAME) |
Return a specific LOCATION variable for the given NAME |
(gitconfig-delete-variable LOCATION NAME) |
Delete a specific LOCATION variable for the given NAME |
(gitconfig-get-local-variables) |
Return all git config --local --list variables as hash table |
(gitconfig-get-global-variables) |
Return all git config --global --list variables as hash table |
(gitconfig-get-system-variables) |
Return all git config --system --list variables as hash table |
(gitconfig-get-local-variable NAME) |
Return a specific git config --local --list variable by the given NAME |
(gitconfig-get-global-variable NAME) |
Return a specific git config --global --list variable by the given NAME |
(gitconfig-get-system-variable NAME) |
Return a specific git config --system --list variable by the given NAME |
gitconfig-git-command
Path to the executable git
shell command.
(setq gitconfig-git-command "/usr/local/bin/git")
gitconfig-buffer-name
Name of the buffer used for git shell output.
(setq gitconfig-buffer-name "*GITCONFIG*")
git checkout -b my_branch
git push origin my_branch