Posted Aug 5, 2008 21:30 UTC (Tue) by bronson (subscriber, #4806)
In reply to: Simplified porcelains? by Sutoka
Parent article: Git Magic
Git just uses EDITOR. So, for instance, if you wanted to edit your commit message using nano,
run "EDITOR=/usr/bin/nano git commit"
Or put "setenv EDITOR=/usr/bin/nano" in your .bashrc to make the change permanent.
Posted Aug 6, 2008 6:40 UTC (Wed) by alex (subscriber, #1355)
[Link]
I find bringing up emacs each commit can be a pain so I tend to just use the -m switch:
git-commit -m "My commit message, maybe over serveral lines" filaA fileB
Editor
Posted Aug 6, 2008 7:52 UTC (Wed) by nix (subscriber, #2304)
[Link]
Set your EDITOR to emacsclient and leave an emacs running.
Editor
Posted Aug 6, 2008 8:48 UTC (Wed) by alex (subscriber, #1355)
[Link]
Sadly I have yet to come up with a solution that works well with all my needs. I tend to run
at least one emacs per "project" which is long running as well as temporary ones for commits
or editing pages. I suspect I just need to think about rules for starting an emacs server in
my .emacs.
The other problem is running text mode emacs on remote screen sessions. I don't want to switch
to another (v)tty when EDITOR gets invoked. I've heard there is a thing called multi-tty but I
have yet to investigate it and it's implications.
Pointers to pimped up emacsserver examples are welcomed :-)
Editor
Posted Aug 6, 2008 9:04 UTC (Wed) by nix (subscriber, #2304)
[Link]
What I'd suggest is an interactive function bound to some key which does a
gnudoit (? is this the Emacs name?) to stop whatever server exists via
(server-start t), then does a (server-start) in the current instance. So
then you can switch which emacs your emacsclient invocation talks to with
a single keystroke.
Alternatively you could set `server-name' on the servers and use
the --socket-name argument to emacsclient.
There are more elaborate methods but these two should work.
I'm afraid as an XEmacs user the multi-tty stuff just works for me ;)
Editor
Posted Aug 6, 2008 14:54 UTC (Wed) by newren (subscriber, #5160)
[Link]
You could just put the commit message in a file and use the -F flag. e.g. git commit -F
file-with-commit-message