Darcs Quick Start

Working in a local repository

Darcs enables you to run many commands locally, including history-changing and history-viewing commands.

Start a new repository in the current directory, and add a file

darcs init initialise the repository
echo foo > file create a file
darcs add file begin tracking file

Show unrecorded changes in this repo, record some, and list the latest patches

darcs whatsnew show unrecorded changes to files Darcs is tracking
darcs whatsnew -l show untracked files too
darcs record select and record changes as a new patch in the local repo
darcs log list patches in this repo

Show changes with a graphical interface

Set meld as default diff program:

echo 'diff diff-command "meld %1 %2"' >> ~/.darcs/defaults
darcs diff show unrecorded changes as a diff
darcs diff -p . show changes of last patch as a diff
darcs diff -p NAME show changes of last patch matching NAME as a diff

Several kinds of undo

darcs revert discard unrecorded changes, resetting the working copy
darcs unrecord un-record a patch in this repo, preserving working copy
darcs obliterate completely erase a patch from this repo and working copy
darcs rollback apply inverse of recorded patch to working copy

Working with remote repositories

Darcs is a decentralized version control system. It can clone repositories, and exchange patches between local and remote repositories.

Get Darcs’ main repo, make a patch and submit it to the upstream maintainer

darcs clone http://darcs.net --lazy do a lazy clone for speed
cd darcs enter the repo
echo > README edit something..
darcs record select and record changes as a new patch
darcs send generate a patch bundle to send to patches@darcs.net

Moving patches between repos, and more

darcs clone USER@HOST:PATH
darcs pull merge new changes from upstream, updating the working copy
darcs push add our new changes to the upstream repo via SSH
darcs help show all commands and how to get more help