<a id="merge-cheat-sheet"></a>

# Merge cheat sheet

## Steps of the merge procedure

1. `rmadison <package_name>`
2. `rmadison -u debian <package_name>`
3. `git ubuntu clone <package_name> <package_name>-gu`
4. `cd <package_name>-gu`
5. `git ubuntu merge start pkg/ubuntu/devel`
6. `git checkout -b merge-<version_of_debian_unstable>-<current_ubuntu_devel_name>`
7. `git log --stat old/debian..`
8. `git ubuntu tag --split` (if there’s nothing to split, type that command straight away)
9. `git rebase -i old/debian`
10. Drop metadata changes and reorder/merge/split commits.
11. `git diff split/`
12. `git ubuntu tag --logical`
13. `git show logical/<version>` (check if the new tag exists)
14. `git rebase -i --onto new/debian old/debian`
15. `quilt push -a --fuzz=0`
16. `quilt pop -a`
17. `git ubuntu merge finish pkg/ubuntu/devel`

## Further reading

* [Merges & syncs](https://documentation.ubuntu.com/project/how-ubuntu-is-made/processes/merges-and-syncs.md#merges-syncs)
