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 > file1   # create a file
darcs add file1    # begin tracking file1

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

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 darcs --lazy  # do a lazy clone for speed
cd darcs           # enter the repo
echo > README      # edit something..
darcs record       # select changes and record them as a new patch in the local repo
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