Skip to content

HOW TO Amend files in older commit #21623

Discussion options

You must be logged in to vote

git rebase -i HEAD~3 is probably what you’re looking for. The base commit for the rebase must be the parent of the first one you want to edit. The option -i (short for --interactive) lets you choose what to do to each commit since, with edit being one option.

See Git - Rewriting History for a lot more details. 🙂

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants