OnWorks favicon

commit-partial - Online in the Cloud

Run commit-partial in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command commit-partial that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator



commit-patch - commit patches to Darcs, Git, Mercurial, Bazaar, Monotone, Subversion, or
CVS repositories


commit-patch [--amend] [-m message] [-F message-file] [-v] [--dry-run] [patch-file]

commit-partial [--amend] [-v] [--dry-run] [--retry] [file ...]


Normally version control systems don't allow fine grained commits. commit-patch allows the
user to control exactly what gets committed (or "recorded", in Darcs parlance) by letting
the user supply a patch to be committed rather than using the files in the current working
directory. If patch-file is not supplied on the command line then the patch will be read
from standard input.

commit-partial is like commit-patch except that it will create a patch from the current
changes in the current working directory and launch your editor so that you can edit the
patch and the commit message (using the VISUAL environment variable, or if that isn't set
the EDITOR environment variable, or, if that isn't set, vi. Any files you specify will be
passed to your version control's diff command.

commit-patch currently supports the following version control systems: Darcs, Git,
Mercurial, Bazaar, Monotone, Subversion, and CVS.


-a, --amend - Amend a previous commit. Currently only Darcs and Git support this option.
When used with Git it will amend the previous commit. When used with Darcs, Darcs will ask
you which patch you want to amend.

-m, --message=message - An optional message to use as the commit text. If the message is
multiple lines then Darcs, Git, and Mercurial will use the first line as the patch name
and the rest as commit details. If the "-m" option is not specified then the result will
be the same as whatever the underlying version control system would do if you didn't
specify a message name on the command line. That is, commit-patch does not interfere with
the patch naming process of the underlying version control system; Darcs will still ask
you interactively; CVS and Subversion will still launch your editor.

-F, --message-file=filename - You can optionally get the commit message from a file. This
is generally only useful for scripting commit-patch.

-v, --verbose - Turn on debugging. This will print the commands that commit-patch is
running to get the patch committed.

-n, --dry-run - Turn on more paranoid debugging. This will print the commands that commit-
patch will run to get the patch committed but it won't actually run those commands.

-r, --retry - Only available in commit-partial. This will reload the last patch that was
attempted to be committed into your editor instead of the current changes in the
directory. This is for cases where the patch fails to commit for some reason and you want
to try to fix it instead of starting over.


commit-patch works by manipulating the working directory using "patch", "interdiff", and
the underlying version control system's "diff". If any part of the process fails, commit-
patch will attempt to restore the working directory to the state it was before the command
was run. Any errors from the underlying version control system or from patch will be


The patch specified on the command line must originate from the same place as the current
directory. That is, the following will not work:

cvs diff -u > ../a.patch
cd ..
commit-patch a.patch

You must run commit-patch from the same directory that the original patch was based from.

Darcs, Git and Mercurial put "a/" and "b/" in front of all the paths in the diff output.
Don't worry about this; commit-patch takes it into account.


Typical CVS usage:

cvs diff -u > a.patch
emacs a.patch
commit-patch a.patch

Mercurial usage with a message specified:

hg diff > a.patch
emacs a.patch
commit-patch -m "This is a commit message" a.patch

Darcs usage with a multi-line message specified:

darcs diff -u > a.patch
emacs a.patch
commit-patch -m 'This is the patch name
Here are the patch details' a.patch


· David Caldwell <[email protected]>

· Jim Radford <[email protected]>


Copyright 2003-2013 by David Caldwell and Jim Radford.

commit-patch is distributed under the GNU General Public License. See the COPYING file in
the distribution for more details.


commit-patch was originally called "cvs-commit-patch" and was a bash script written in
2003 by Jim Radford (with David Caldwell in the room drawing the procedure on a white
board). David later converted it do "darcs-commit-patch", then integrated them back
together into commit-patch. Mercurial support was then added. At some point David
translated from bash into perl because funky bash quoting issues were causing problems
with a repository that had a space in one of the directory names.

Use commit-partial online using onworks.net services

Free Servers & Workstations

Download Windows & Linux apps

  • 1
    FreeRTOS Real Time Kernel (RTOS)
    FreeRTOS Real Time Kernel (RTOS)
    FreeRTOS is a market-leading real-time
    operating system (RTOS) for
    microcontrollers and small
    microprocessors. Distributed freely
    under the MIT open source lice...
    Download FreeRTOS Real Time Kernel (RTOS)
  • 2
    Avogadro is an advanced molecular
    editor designed for cross-platform use
    in computational chemistry, molecular
    modeling, bioinformatics, materials
    science and ...
    Download Avogadro
  • 3
    Strikr Free Software project. Artifacts
    released under a 'intent based'
    dual license: AGPLv3 (community) and
    CC-BY-NC-ND 4.0 international
    Download strikr
  • 5
    giflib is a library for reading and
    writing gif images. It is API and ABI
    compatible with libungif which was in
    wide use while the LZW compression
    algorithm was...
    Download GIFLIB
  • 6
    With Hugin you can assemble a mosaic of
    photographs into a complete immersive
    panorama, stitch any series of
    overlapping pictures and much more..
    Audience: Sci...
    Download Hugin
  • 7
    Alt-F provides a free and open source
    alternative firmware for the DLINK
    DNS-320/320L/321/323/325/327L and
    DNR-322L. Alt-F has Samba and NFS;
    supports ext2/3/4...
    Download Alt-F
  • More »

Linux commands