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.
Loading...
Related Quiz
- In Git, what does the command git push -u origin master do?
- What is a common strategy for managing releases in the Gitflow model?
- What is the primary purpose of a version control system?
- Which Git command is used to view the status of files and potential conflicts after a merge attempt?
- A DevOps pipeline often uses git _______ to trigger automated builds and tests.