mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
22 lines
514 B
Plaintext
22 lines
514 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# git replace
|
|
|
|
> Create, list, and delete refs to replace objects.
|
|
> More information: <https://git-scm.com/docs/git-replace>.
|
|
|
|
- Replace any commit with a different one, leaving other commits unchanged:
|
|
|
|
`git replace {{object}} {{replacement}}`
|
|
|
|
- Delete existing replace refs for the given objects:
|
|
|
|
`git replace {{[-d|--delete]}} {{object}}`
|
|
|
|
- Edit an object's content interactively:
|
|
|
|
`git replace --edit {{object}}`
|