There is already an excellent Git client in the Emacs ecosystem, magit. But it didn’t quite suit my day-to-day development, so I tried to develop a git plugin that worked for me.
My needs:
- Can quickly invoke the common commands of git, without the need for a large number of configuration items to choose.
- Run git commands asynchronously without getting Emacs stuck.
- clone the project in your own emacs configuration files directory, like:
git clone [email protected]:ginqi7/git-emacs.git ~/.emacs.d/lisp/git-emacs
- add the path to ‘load-path’
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/git-emacs"))
- git checkout
- git-log–oneline
- git checkout -b
- git diff
- git submit current file
- git submit selected file