What is the first step you should take when encountering a merge conflict in Git?
- Stash changes and reset to the last commit
- Manually resolve the conflict in the code
- Abandon changes made since the last commit
- Commit the changes without resolving the conflict
When encountering a merge conflict in Git, the first step is to manually resolve the conflict in the code. This involves identifying and resolving the conflicting changes in the affected files. Stashing changes, resetting to the last commit, or committing without resolving the conflict are not recommended as they may lead to issues in the version history and code consistency.
Loading...
Related Quiz
- What is a pull request in the context of Git?
- In the Gitflow workflow, the ________ branch contains the official release history.
- GitLab’s CI/CD pipelines can be configured through a file named _________.
- The command git __________ is useful for reducing the size of a repository by removing unnecessary data.
- What is a tag in Git?