AWS CodeCommit
Pushing api into a destination repository that , default branch , in mode, with Allow overwrite on non-empty destination .
| Ref | Source | Destination | What the run does |
|---|---|---|---|
refs/heads/mainDestination default branch | 4f2a9c1 | 9b07e3d | Moved to the source commit |
refs/heads/release/2.4 | 1c88d20 | 1c88d20 | Already the same |
refs/heads/feature/batch-upload | 7e51b04 | none | New in the destination |
refs/tags/v2.4.0 | 1c88d20 | none | New in the destination |
refs/heads/legacy | none | 3a9f6e2 | Deleted from the destination |
refs/tags/v1.9.0-rc1 | none | 5d02c7a | Deleted from the destination |
2 new, 1 moved, 1 already the same, 2 deleted. Mirror pushes the whole repository in one step. Both modes make the destination match the source.
The rules are Douklar's; the repository, its refs and their object ids are samples. In the CLI, --codecommit-overwrite ticks Allow overwrite on non-empty destination and --codecommit-push-mode picks the mode.
- What moves
- Branches and tags, as a mirror or incremental push
- Your choices
- Mirror or incremental push; rename the repository on the way
How it moves
- Mirror (
git push --mirror) or incremental pushes; the mode you chose is the mode that runs. - The destination ref snapshot is re-checked right before the push; source and destination refs are compared at the end.
- Default-branch protection; a mirror stops above 4,000 destination refs.
- A retry keeps the original destination snapshot.
Limits
- A non-empty destination needs your permission to overwrite (CLI
--codecommit-overwrite); then branches and tags that exist only in the destination are removed, in either mode. - Copies into an existing repository; it does not create repositories or add refs of its own.
For a single repository with no review or reporting needs, plain git mirroring is simpler.