1 / 45

Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | Git Tutorial | Simplilearn

This video on Git Merge Conflict will help you understand the concept of Git Merge Conflicts. We will begin with understanding some basic Git commands. Then we shall focus on the Git Merge conflict in which we shall see the type of merge conflicts and how that conflict can be resolved. Towards the end, we shall see the commands required to resolve the conflict. Finally, to have a better understanding of the Git Merge Conflict and how to solve it, we shall see a hands-on demo. <br><br>The below topics will be explained in this presentation: <br>1. What is Git?<br>2. Basic Git commands<br>3. What is a merge conflict<br>4. Types of merge conflicts<br>5. How to resolve merge conflicts? <br>6. Git commands to resolve conflicts<br>7. Demo<br><br><br>Learn the basics of Gitu2014a version control system (VCS), and understand how to set up Git in your system, list the three-stage workflow in Git, create branches and track files, create repository in Git, GitHub and more.<br><br>Whatu2019s the focus of this course?<br>Git is a version control system (VCS) for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for software development, but it can be used to keep track of changes in any files.This course enables you to learn and solve versioning problems with your files and codes. All these concepts are presented in an easy to understand manner, using demos and assignments to clarify the concepts and present the actual method of implementation.<br><br>What are the course objectives?<br>- Git course offered by Simplilearn will enable you to:<br>- Understand distributed version control system and its features<br>- Set-up Git in your system<br>- List the three-stage workflow in Git<br>- Create branches and track files<br>- Create a repository in Git and GitHub<br>- Describe merging, cloning, rebasing, among others<br><br>Who should take this course?<br>- The following professionals can go for this course:<br>- Software Professionals<br>- Testing Professionals<br>- Software Architects and Designers<br>- Open source contributors and enthusiasts<br>- Developers who want to gain acceleration in their careers as professionals using Git and GitHub<br>- Managers who are technical subject matter experts, leading software development projects<br><br>ud83dudc49Learn more at: https://bit.ly/3f7UQh0<br>

Simplilearn
Download Presentation

Git Merge Conflict Tutorial | Resolving Merge Conflicts In Git | Git Tutorial | Simplilearn

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. What’s in it for you? What is Git? Basic Git commands What is a merge conflict? Types of merge conflicts How to resolve merge conflicts? Git commands to resolve conflicts Demo

  2. What is Git?

  3. Click here to watch the video

  4. What is Git? • Git is a version control system for tracking changes in computer files. It is used for coordinating work among several people on a project and tracking progress over time • It is used for Source Code Management in software development

  5. What is Git? • Git favors both programmers and non-technical users by keeping track of their project files

  6. What is Git? • Git favors both programmers and non-technical users by keeping track of their project files • It allows multiple users to work together

  7. What is Git? • Git favors both programmers and non-technical users by keeping track of their project files • It allows multiple users to work together • Large projects can be handled efficiently

  8. Basic commands in Git

  9. Basic commands in Git

  10. Basic commands in Git Git config Configure the username and email address

  11. Basic commands in Git Git config Configure the username and email address Git init Initialize a local Git repository

  12. Basic commands in Git Git config Configure the username and email address Git init Initialize a local Git repository Git add Add one or more files to staging area

  13. Basic commands in Git Git config Configure the username and email address Git init Initialize a local Git repository Git add Add one or more files to staging area View the changes made to the file Git diff

  14. Basic commands in Git Git config Configure the username and email address Git init Initialize a local Git repository Git add Add one or more files to staging area View the changes made to the file Git diff Git commit Commit changes to head but not to the remote repository

  15. Basic commands in Git Git reset Undo local changes to the state of a Git repo

  16. Basic commands in Git Git reset Undo local changes to the state of a Git repo Git status Displays the state of the working directory and staging area

  17. Basic commands in Git Git reset Undo local changes to the state of a Git repo Git status Displays the state of the working directory and staging area Git merge Merge a branch into an active branch

  18. Basic commands in Git Git reset Undo local changes to the state of a Git repo Git status Displays the state of the working directory and staging area Git merge Merge a branch into an active branch Git push Upload content from local repository to a remote repository

  19. Basic commands in Git Git reset Undo local changes to the state of a Git repo Git status Displays the state of the working directory and staging area Git merge Merge a branch into an active branch Git push Upload content from local repository to a remote repository Git pull Fetch and download content from a remote repository

  20. What is merge conflict?

  21. What is a merge conflict? Pull Pull Push Push Merge conflict

  22. What is a merge conflict? To prevent such conflicts developers work in separate isolated branches. The Git merge command combines separate branches and resolves any conflicting edits Pull Pull Push Push Merge conflict

  23. What is a merge conflict? • A merge conflict is an event that takes place when Git is unable to resolve differences in code between the two commits automatically • Git can automatically merge the changes only if the commits are on different lines or branches Pull Pull Push Push Merge conflict

  24. Types of merge conflicts

  25. Types of merge conflicts

  26. Types of merge conflicts There are two points when a merge can enter a conflicted state

  27. Types of merge conflicts There are two points when a merge can enter a conflicted state Starting the merge process • If there are changes in the working directory of the stage area of the current project, merge will fail to start • In this case conflicts happen due to pending changes which need to be stabilized using different Git commands

  28. Types of merge conflicts There are two points when a merge can enter a conflicted state Starting the merge process During the merge process • If there are changes in the working directory of the stage area of the current project, merge will fail to start • In this case conflicts happen due to pending changes which need to be stabilized using different Git commands • The failure during the merge process indicates that there is a conflict between the local branch and the branch being merged • In this case Git resolves as much as possible but there are things that have to be resolved manually in the conflicted files

  29. How to resolve merge conflicts?

  30. How to resolve merge conflicts?

  31. How to resolve merge conflicts? The most simple way to resolve the conflicted file is to open it and make the required changes to it

  32. How to resolve merge conflicts? The most simple way to resolve the conflicted file is to open it and make the required changes to it After editing the file we can use the git add command to stage the new merged content

  33. How to resolve merge conflicts? The most simple way to resolve the conflicted file is to open it and make the required changes to it After editing the file we can use the git add command to stage the new merged content The final step is to create a new commit with the help of the git commit command

  34. How to resolve merge conflicts? The most simple way to resolve the conflicted file is to open it and make the required changes to it After editing the file we can use the git add command to stage the new merged content The final step is to create a new commit with the help of the git commit command Git will create a new merge commit to finalize the merge

  35. Git commands to resolve conflicts

  36. Git commands to resolve conflicts

  37. Git commands to resolve conflicts git log --merge git log --merge command helps in producing the list of commits that are causing the conflict

  38. Git commands to resolve conflicts git log --merge git log --merge command helps in producing the list of commits that are causing the conflict git diff git diff command helps in finding the differences between the states of repositories or files

  39. Git commands to resolve conflicts git log --merge git log --merge command helps in producing the list of commits that are causing the conflict git diff git diff command helps in finding the differences between the states of repositories or files git checkout git checkout command is used to undo the changes made to the file, or for changing branches

  40. Git commands to resolve conflicts git reset --mixed git reset –mixed command is used to undo the changes to the working directory and staging area

  41. Git commands to resolve conflicts git reset --mixed git reset –mixed command is used to undo the changes to the working directory and staging area git merge --abort git merge --abort command helps in exiting the merge process and returning back to the state before the merging began

  42. Git commands to resolve conflicts git reset --mixed git reset –mixed command is used to undo the changes to the working directory and staging area git merge --abort git merge --abort command helps in exiting the merge process and returning back to the state before the merging began git reset git reset command is used at the time of merge conflict to reset the conflicted files to their original state

  43. Demo

More Related