GIT Interview Questions and Answers
Ques 11. How do you revert a commit that has already been pushed and shared with others?
You can use 'git revert' to create a new commit that undoes the changes introduced by the previous commit.
Ques 12. What is a Git submodule?
A Git submodule is a reference to a specific commit in another repository within the current repository. It allows for better organization and management of project dependencies.
Ques 13. Explain the purpose of the 'git cherry-pick' command.
'git cherry-pick' is used to apply specific commits from one branch to another.
Ques 14. What is a Git stash, and how is it used?
A Git stash is a way to temporarily save changes that are not ready to be committed. It allows you to switch branches without committing or discarding changes.
Ques 15. How do you rename a Git branch?
You can use the 'git branch -m' command followed by the new branch name to rename a Git branch.
Most helpful rated by users: