mirror of
https://github.com/mike-rambil/Advanced-Git.git
synced 2026-01-05 00:49:31 -06:00
35 lines
444 B
Markdown
35 lines
444 B
Markdown
# git replace <old-commit> <new-commit>
|
|
|
|
|
|
#### Category
|
|
History
|
|
> Temporarily substitute one commit for another.
|
|
|
|
|
|
#### Command
|
|
```sh
|
|
git replace abc123 def456
|
|
```
|
|
|
|
#### Examples
|
|
- **Temporarily replace commit abc123 with def456.**
|
|
|
|
|
|
```sh
|
|
git replace abc123 def456
|
|
```
|
|
|
|
|
|
#### Steps
|
|
1. Run `git replace <old-commit> <new-commit>` to test or patch history.
|
|
|
|
|
|
#### Tags
|
|
`replace`, `history`
|
|
|
|
#### Author
|
|
mike-rambil
|
|
|
|
#### Last Updated
|
|
2024-06-10
|