Difference between revisions of "Emacs-VersionControl"

From Coder Merlin
Line 1: Line 1:
== Version Control Within Emacs ==
== Version Control Within Emacs ==
* Reference:  [https://www.emacswiki.org/emacs/VersionControl Emacs Version Control (from Wiki)]
* Reference:  [https://www.emacswiki.org/emacs/VersionControl Emacs Version Control (from Wiki)]
== '''IMPORTANT NOTE''' ==
In order to use these commands with a remote repository, it's best to cache your credentials.  On the command line, execute:
git config --global credential.helper 'store --file ~/.git-credentials'
git config --global credential.useHttpPath true


== Useful Commands ==
== Useful Commands ==

Revision as of 10:41, 23 November 2018

Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Version Control Within Emacs[edit]

IMPORTANT NOTE[edit]

In order to use these commands with a remote repository, it's best to cache your credentials. On the command line, execute:

git config --global credential.helper 'store --file ~/.git-credentials' 
git config --global credential.useHttpPath true


Useful Commands[edit]

  • Add file to version control : vc-register -- add a new file to version control
    • C-x v i (last character is a lower-case I)
  • Compare current version with repository : vc-diff -- diff with other revisions
    • C-x v =
  • Show log : vc-print-log -- show log
    • C-x v l (last character is a lower-case L)
  • Show status : vc-directory -- show all files which are not up to date
    • C-x v d
  • Revert buffer : vc-revert-buffer -- undo checkout
    • C-x v u