tldr/pages/common/git-replace.md

17 lines
414 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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