1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-05 11:55:44 +02:00
tldr/pages/common/git-replace.md
2025-07-23 21:38:23 +05:30

421 B

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}}