vc-git - アールメカブ




How to use Git with VC

Question: I would like to do everything from within Emacs (without having to resort to the command-line). I was able to create a new repository with ‘vc-create-repo’, but don’t know how to add all the files in the directory with ‘vc-next-action’ – something akin to (eventually calling the backend command) git add . – without having to add each file separately. Any tips?

Answer: With vc-git.el 2007-11-29 or later, you can do

‘C-x v d’ to see the (empty) directory; then

`v t’ to toggle visibility of “modified” files; then
`m’ to mark files to add; and finally
`v v’ to do the next action (i.e, commit)

NOTE: This does not seem to work with remote repos (vc-git.el 2010-03-09).

Question: How do I revert an uptodate file to a previous version? How do I manage branches?

[1]: Sorry, but it is absolutely unclear what vc-git.el (coming with emacs23) provides. Neither Info nor vc-git.el give any information about what works with remote repositories and how (cloning, staging, registering, commiting, …). What is stash? What is the master-file? Why does vc-dir not show the remote-url?

Link: Linuxの備忘録(4576d)
Last-modified: 2010-10-09 (土) 10:40:49 (5031d)