Darcs Quick Start

Configuring Darcs

Set your author name following the convention Author <email>:

echo "My Name <user@host.net>" > ~/.darcs/author

Set meld as default diff program for a graphical diff:

echo "diff diff-command meld %1 %2" >> ~/.darcs/defaults

Interactive selection

Most commands show an interactive selection interface. The most basic keys are:

Working in a local repository

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 -m "patch name" select and record changes as a new patch in the local repo
darcs log list patches in this repo

Show changes as diffs

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

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

Tutorials