Emacs version control

July 30, 2008 at 10:33 pm 3 comments

I discovered how emacs version control worked today… and was duelly impressed. (Having previously thought that it didn’t work at all well – guess this means I should learn to read manuals).[1]

Regardless, emacs comes with a unified version control front-end which supports back-ends for most version control systems : I believe this includes git, svn and bzr).  This can do most of the things that one wants to do.

One of my only irritations is that one can’t revert individual lines of the diffs that it shows.

Summary for the impatient

Emacs version control is wonderful, I’m dim for not realising this earlier. To make it work do the following:

C-x v = in a file for a diff

To submit:

C-x v d <TOP LEVEL DIR> to get a list of all modifed files, then mark everything (hold down m) and press C-x v v.

If you want to see diffs for individual files press v=.

[1] As an aside, one of the reasons I hadn’t found this out earlier was because I was under the false impression the mode help (C-h m) would show all relevant keybindings… I’m not quite sure why, C-h b is (strangely!) better for this purpose.


Entry filed under: Uncategorized. Tags: , .

Searching multiple buffers emacs Hardcoding parameters into function names

3 Comments Add your own

  • 1. Rodrigo Amestica  |  August 7, 2008 at 3:36 pm

    I just wish that maintenance for pcl-cvs is just revived. I think that this mode supports only cvs, which happens to be what I need to use.

  • […] are posts on searching multiple buffers, emacs version control and emacs buttons within the same […]

  • 3. Ivan Andrus  |  March 17, 2009 at 4:02 am

    I’m not sure if this is what you are wanting, but I use diff-split-hunk (C-c C-s) to take a hunk and split it into two, and then I can apply the hunk with diff-apply-hunk (C-c C-a) and it asks me if I want to revert the hunk, which I do (prefix argument also forces a reverse). This could of course be made into a function which quite easily.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

July 2008
« May   Aug »

%d bloggers like this: