Which command in Git helps in rewriting commit history?

  • git commit --amend
  • git commit --force
  • git rebase -i
  • git merge --squash
The git rebase -i command is used for interactive rebasing, allowing you to modify and rewrite commit history. It provides options to reorder, edit, squash, or drop commits, giving you flexibility in shaping the commit history.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *