How can you cherry-pick a commit from another branch into your current branch in Git?
- git pick -c
- git cherry-pick
- git apply
- git merge
The correct option is git cherry-pick . This command allows you to apply the changes introduced by the specified commit to your current branch. Cherry-picking is useful for selectively bringing in specific changes.
Loading...
Related Quiz
- A developer needs to apply a hotfix from the master branch to a release branch without merging other changes. What Git feature should they use?
- The git ________ command can be used to create a complete standalone copy of a repository.
- The command git _______ is used to create a new branch and switch to it in one step.
- How does adding files to .gitignore affect existing tracked files in Git?
- How does the 'shallow clone' feature in Git help with large repositories?