help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: single-command git commits


From: Emanuel Berg
Subject: Re: single-command git commits
Date: Tue, 19 Jul 2016 02:33:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Eric Abrahamsen <eric(a)ericabrahamsen.net>
writes:

> I'm working on a long document in
> a single-file git repository (I know there
> are probably better solutions). What I'd like
> to do is have a single command that prompts
> me for a git commit message, and then
> commits. The in-Emacs equivalent of:
>
> git commit -a -m "(read-string \"Commit
> message: \")"

(defun git-commit (msg)
  (interactive "sCommit message: ")
  (shell-command
   (format "git commit -a -m %s" msg) ))

> Free beers in return...

Emanuel Berg
Dalgatan 8
752 18 Uppsala
Sweden

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 58 Blogomatic articles -                   


reply via email to

[Prev in Thread] Current Thread [Next in Thread]