# Merge, auto-merge, conflicts and reverts

Merge a change request three ways, let it merge itself when ready, fix conflicts in the browser, and take a merge back.

## Merge

```sh
bit cr merge 42              # a merge commit (the default)
bit cr merge 42 --squash     # one commit with the whole change
bit cr merge 42 --rebase     # each commit replayed onto the base
bit cr merge 42 -d           # and delete the head branch afterwards
```

`-s` and `-b` set the merge or squash commit's title and body. The web's merge box offers the same choices.

## Auto-merge

```sh
bit cr merge 42 --auto
```

Auto-merge merges the change request on Lorx as soon as it can: open, not a draft, and merging cleanly. It happens even with your machine off, and at once if it can merge already. `--disable-auto` disarms it.

## Conflicts

When a change request conflicts with its base, Lorx shows each conflict side by side in the browser. Pick a side, or edit the result, and Lorx commits the fix to the branch. `bit cr view` lists the files that conflict.

## Close, reopen and revert

```sh
bit cr close 42 -r "superseded by #43"
bit cr reopen 42
bit cr revert 42      # a new change request that takes #42 back, one commit on a new branch
```
