DifferencesFromGit
The index
Darcs does not use a git-style index (we have a control file called "index" which is completely unrelated) to stage commits.
If staging is important to you, one workflow you could try is to to use amend-record to stage changes as you go. You could, for example, record a patch named "DRAFT" and incrementally add to this using amend-record. When you're done, just amend-record --edit to give the patch its final name.
Some advantages of Git staging, pointed out by Alberto Bertolgi, with a proposal of equivalent workflow with darcs:
- when merging, the git index stores non-conflicted changes. A status/diff will only show you only the conflicted paths.
-But then, doing whatsnew just after pull also gives exactly the conflicts, assuming you did record DRAFT.
- if you want to change a non-conflicted path, you can easily ask for a diff between the version from your working directory and the version that the merge has prepared.
-darcs whatsnew after pull should also show you that.
- it is also very useful when splitting big patches or rebasing a long list of commits.
-When ready, interactive rebase for darcs should let you do that using normal darcs commands.
Hunks
Git and Darcs use the word 'hunk' in subtly different ways. The difference seems to be that a darcs hunk is a contiguous block of changes to a file; whereas a git hunk seems to be any set of changes to a given file. Darcs would model the latter as a set of hunks.
Local branches
Darcs does not yet support local branches. See http://bugs.darcs.net/issue555
See also
- http://lists.osuosl.org/pipermail/darcs-users/2010-January/022724.html
- http://hackage.haskell.org/trac/ghc/wiki/GitForDarcsUsers?version=25#Commands gives a git equivalent to the most used darcs commands
