{"id":17070517,"url":"https://github.com/oakmac/merge-conflict-practice","last_synced_at":"2025-07-02T15:32:32.906Z","repository":{"id":66970596,"uuid":"153703287","full_name":"oakmac/merge-conflict-practice","owner":"oakmac","description":null,"archived":false,"fork":false,"pushed_at":"2018-10-24T01:43:18.000Z","size":138,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T11:14:03.096Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oakmac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-19T00:16:22.000Z","updated_at":"2018-10-20T02:09:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"2a8c4c06-e490-4860-91df-8e79207d9667","html_url":"https://github.com/oakmac/merge-conflict-practice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oakmac/merge-conflict-practice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fmerge-conflict-practice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fmerge-conflict-practice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fmerge-conflict-practice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fmerge-conflict-practice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oakmac","download_url":"https://codeload.github.com/oakmac/merge-conflict-practice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oakmac%2Fmerge-conflict-practice/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263166005,"owners_count":23424065,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T11:32:01.104Z","updated_at":"2025-07-02T15:32:32.883Z","avatar_url":"https://github.com/oakmac.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Merge Conflict Practice\n\nDon't worry, it's not as scary as it sounds!\n\n## What is a merge conflict?\nWhen collaborating on code, sooner or later you're going to get something\ncalled a merge conflict. A merge in general is simply the process of\nintegrating changes from another branch to our current working branch.\n\nIn most cases, Git know what to do in merge process but there are some\ncases when \"conflicts\" happens and we have to enter in action. Generally\nspeaking, a conflict occurs when two people changed the same lines\nin the same file, or if one person decided to delete it while the other person \ndecided to modify it, or any sort of similar scenario. In these kinds of situations,\nGit simply cannot know what is correct. So, Git will then mark the file as having a conflict - which you'll\nhave to *resolve* before you can continue your work.\n\n## Let's make a conflict!\n1. Clone this repository if you haven't already\n2. cd into the project from your command line (`cd merge-conflict-practice`)\n3. Enter command `git status` and make sure you are on the master branch\n4. Open up VsCode and navigate to the animals.md file.\nYou should see something like:\n![](/img/recipe.png)\n5. Add two or three other animals to the list, right below \"5. Lion\"\n6. Add and commit your changes, but don't push!\n7. After you have added and committed, run command `git merge origin/partner`.\nThe branch \"partner\" is a branch we already made which will create a conflict with\nthe changes you just made. After running the merge command you should see something\nlike this:\n![](/img/conflict.png)\n8. Move on to the next step to resolve this conflict!\n\n## Now how do we resolve this conflict?\n\n1. In VsCode open up animals.md file. \nYou should see a bunch of weird markers like `\u003e\u003e\u003e`, `===`, and `\u003c\u003c\u003c`:\n![](/img/conflicting-file.png)\n*NOTE: the actual animal names and what not will differ based on what you added!*\n2. The file markers are telling us that Git has found that there are changes made\nto the same place in the file by two different branches, and it wants to know\nwho's changes to take. In between `\u003c\u003c\u003c\u003c\u003c HEAD` and `=======` are your changes.\n3. These are the changes we want, so all we need to do is delete what's in between \n`=======` and `\u003e\u003e\u003e\u003e\u003e\u003e\u003e origin/partner`.\n4. Now get rid of the extra markers  `\u003e\u003e\u003e`, `===`, and `\u003c\u003c\u003c`\n5. Save the file\n6. Go to terminal and enter `git status`, you should see that animals.md\nhas been modified\n7. Add, commit, and push your changes\n8. Pat yourself on the back, you resolved a merge conflict!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foakmac%2Fmerge-conflict-practice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foakmac%2Fmerge-conflict-practice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foakmac%2Fmerge-conflict-practice/lists"}