# info > DEBCOMMIT

---
type: CommandReference
command: debcommit
mode: man
section: 1
source: man-pages
---

## Quick Reference

- `debcommit` — commit changes with message from debian/changelog
- `debcommit --release` — commit and tag a release
- `debcommit -m "message"` — use a specific commit message
- `debcommit -n` — dry run (print commands only)
- `debcommit -d` — show diff of what would be committed
- `debcommit -C` — confirm before committing
- `debcommit -e` — edit commit message in editor
- `debcommit --all` — commit all files (default for non-git VCS)

## Name

**debcommit** — commit changes to a package

## Synopsis

`debcommit [options] [--all | files to commit]`

## Options

- `-c, --changelog path` — specify alternate location for changelog (default: `debian/changelog`)
- `-r, --release` — commit a release; version taken from changelog, tag created in repository
- `-R, --release-use-changelog` — when used with `--release`, derive commit message from uncommitted changelog changes
- `-m, --message text` — use given commit message (overrides auto-detection)
- `-n, --noact` — dry run; print commands without executing
- `-d, --diff` — show diff of what would be committed (useful for patches)
- `-C, --confirm` — display message and ask for confirmation; allows editing
- `-e, --edit` — edit commit message in editor before committing
- `-a, --all` — commit all files (default for non-git VCS)
- `-s, --strip-message, --no-strip-message` — strip leading `* ` from changelog-derived message (default: yes, unless multiple lines start with `[*+-] `)
- `--sign-commit, --no-sign-commit` — sign commit with gnupg (supported: git, hg, bzr)
- `--sign-tags, --no-sign-tags` — sign tags with gnupg (supported: git)
- `--changelog-info` — use Maintainer and Date from first changelog paragraph as author/date (useful with `debchange --no-mainttrailer`)

### Configuration Variables

These variables are read from `/etc/devscripts.conf` and `~/.devscripts` (in that order). Command-line options override them.

- `DEBCOMMIT_STRIP_MESSAGE` — set to `no` to disable stripping (default: yes)
- `DEBCOMMIT_SIGN_TAGS` — set to `yes` to sign tags (default: no)
- `DEBCOMMIT_SIGN_COMMITS` — set to `yes` to sign commits (default: no)
- `DEBCOMMIT_RELEASE_USE_CHANGELOG` — set to `yes` to enable `--release-use-changelog` by default (default: no)
- `DEBSIGN_KEYID` — key ID used for signing tags (default: chosen by VCS)

## VCS-Specific Features

- **tla / baz** — if commit message >72 characters, a summary of full words within 72 characters plus ellipsis is created.
- **git** — if only a single changelog change, unfold to one line and strip `* `; otherwise, compose summary line (first change unfolded/stripped) + blank line + remaining changes, then spawn editor.
- **hg / darcs** — first change unfolded to single-line summary; if multiple changes, editor spawned.
- **bzr** — if changelog entry closes bugs, generate `--fixes` options for `bzr commit`.

## Examples

- Commit all changes with message from latest changelog entry:
  ```shell
  debcommit
  
- Commit a release and tag it:
  ```shell
  debcommit --release
  
- Use a custom commit message:
  ```shell
  debcommit -m "Fix typo in man page"
  
- Dry run to see what would be executed:
  ```shell
  debcommit -n
  
- Show diff of uncommitted changes:
  ```shell
  debcommit -d
  
- Confirm before committing (allows editing message):
  ```shell
  debcommit -C
  
- Edit message in editor before committing:
  ```shell
  debcommit -e
  
## See Also

- [debchange(1)](http://localhost/phpMan.php/man/debchange/1/markdown)
- [svnpath(1)](http://localhost/phpMan.php/man/svnpath/1/markdown)