LWN.net Logo

Simplified porcelains?

Simplified porcelains?

Posted Aug 5, 2008 20:36 UTC (Tue) by Sutoka (guest, #43890)
In reply to: Simplified porcelains? by jwb
Parent article: Git Magic

The tutorial I used to learn git was: http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html

For a while it vanished from google so I had lost it until just now when I searched for it. To get git push working all I did was just followed the instructions on my Gitorious project page:
You can run "git push git@gitorious.org:[project]/mainline.git", or you can setup a remote by doing the following:
git remote add origin git@gitorious.org:[project]/mainline.git
# to push the master branch to the origin remote we added above:
git push origin master
# after that you can just do:
git push

Basically, it was extremely for me easy to setup, it might be harder if you're trying to setup the remote server yourself, but I tried that several times with SVN and CVS and never once got it to work (plus the tutorials I kept finding were having me install apache and a crap load of other services).

My only 'problem' with Git is that I didn't really know how to use Vim so I kinda had to learn that on the fly. IMO, Git is extremely easy to learn and takes very little effort to use (definitely more intuitive than Vim :P).


(Log in to post comments)

Simplified porcelains?

Posted Aug 5, 2008 21:30 UTC (Tue) by bronson (subscriber, #4806) [Link]

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.

Editor

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

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds