
Well done, you can now resolve merge conflicts. When you are happy with the file, save.Īnd finally, commit your merged files.

Choose lines by clicking on the left and right. Usually, LOCAL (yours) is on the left, REMOTE (theirs) is on the right, and the final merged file is in the center. (If you want to cause a merge conflict to test this, create a repository with two users and edit the same line, commit both changes and only pull&push after that.) $ git mergetoolĪ windows with three panes open. When you have a merge conflict, you can run mergetool. $ git config -global mergetool.keepBackup false If two users have edited the same line at the same time, the last one gets a merge conflict. Just stop reading this article and keep on coding. If your merge was automatically resolved (like most are), you don’t have to do anything. To enjoy this feature,Ī simple workflow for this is described in Publish Your Project with GitHub: $ git add. Git can merge most changes automatically. Prequisites: command line basics, git basics This article describes an easy way to solve merge conflicts using graphical merge tool meld.

If two users edit the same line, git notices merge conflict. If you edit the bottom and your friend edits the top, git merges the changes automatically. If you work with your friends on the same git repository, you might edit the same file.
