If you accidentally commit to the wrong branch in Git, what command can help you move the commit to the correct branch?
- git cherry-pick
- git move-commit
- git amend
- git rebase
When you accidentally commit to the wrong branch, you can use git rebase to move the commit to the correct branch. This interactive rebase allows you to pick, edit, or squash commits, providing flexibility in rearranging your commit history.
Loading...
Related Quiz
- What is the main purpose of using Git Submodules?
- How can branching strategies in Git enhance build automation processes?
- In what way does integrating Git with an IDE assist in resolving merge conflicts?
- How does Git support distributed teams in handling merge conflicts?
- Which Git Hook is triggered before a commit is finalized?