Darcs Quick Start

Working in a local repository

Unlike Subversion, but like Git and Mercurial, Darcs enables you to run many commands locally, including history-changing and history-viewing commands.

Start a new repo 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, ready to commit

Show uncommitted edits and file changes in this repo, commit some, and list the latest commits

darcs whatsnew     # show uncommitted changes to files Darcs is tracking
darcs whatsnew -sl # just the files, untracked ones too (or: darcs status)
darcs record       # select edits and commit them to the local repo
darcs changes      # list commits in this repo (or: darcs log)

Several kinds of undo

darcs revert       # discard uncommitted edits, resetting the working copy
darcs rollback     # reverse a committed change in this and remote repos
                   # history-rewriting:
darcs unrecord     # un-commit a change in this repo, preserving working copy
darcs obliterate   # reverse and forget a committed change in this repo

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 change and submit it to the upstream maintainer

darcs get http://darcs.net darcs --lazy  # fetch history lazily for speed
cd darcs           # enter the repo
echo > README      # edit something..
darcs record       # select edits and commit them to the local repo
darcs send         # submit patches upstream if your system speaks email,
darcs send -O      # or save a patch file you can email to patches@darcs.net

Moving changes between repos, and more

darcs get USER@HOST:PATH  # get a repo via SSH
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 in English

A brief introduction to Darcs, from Carpetcode.org

Another short how-to from zwiki.org

Understanding Darcs the wikibook

Tutorials in Spanish

Darcs, mini-guía para proyectos en grupo

Utilizando Darcs

Una introducción a Darcs (pdf)

Darcs: controles de versiones redux

Tutorials in Catalan

Darcs: control de versions redux