tldr/pages/common/git-replace.md

414 B
Raw Permalink Blame History

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 --delete {{object}}

  • Edit an objects content interactively:

git replace --edit {{object}}