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.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *