Github tricks when merge has conflicts

For example; we have branch task-12 multiple people commit to branch and they fix conflicts you want to git pull and then commit your changes but when you git pull it has conflict with your local copy of this branch then follow this steps to get latest version of branch without confilicts

git stash git pull -> here we notices we have conflicts git merge --abort git checkout origin/task-12 git stash apply git add . git commit -m "new changes" git branch -D task-12 -> we remove old copy of branch git checkout -b task-12 git push -u origin task-12