snippetbashTip
git replace — Create, list, and delete refs to replace objects. More information: <https://git-scm.com/docs/git-re
Viewed 0 times
createdeletecommandandgit replaceclilistrefs
Problem
How to use the
git replace command: Create, list, and delete refs to replace objects. More information: <https://git-scm.com/docs/git-replace>.Solution
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}}Code Snippets
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}}Context
tldr-pages: common/git replace
Revisions (0)
No revisions yet.