find merge conflicts git code example

Example 1: git find merge conflicts

git diff --name-only --diff-filter=U

Example 2: how to handle merge conflicts

git stash        -- > take my project to temp memory
git pull         -- > pull the project from GitHub to working directory
						(my computer)
git stash pop    -- > take my project to my working directory,     
					fix the conflict and merge the project.
git add .
git commit –m “comment”
git push

Example 3: git Automatic merge failed; fix conflicts and then commit the result

$ git status

$ git add .

$ git commit -a "Comment"

Tags:

Misc Example