DEV Community

Discussion on: [Git] How do I merge featured branch into master, when master have already be edited (e.g. bug fixes)

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Thanks. Here is what I do.

  • Merge "fixes" into "master" by making PR on GitHub.
  • Delete branch both on remote and local
git branch -d fixes
git remote prune origin
  • On local, checkout "feature" using VSCode, then merge "master"
$ git merge master
Auto-merging ***
CONFLICT (content): Merge conflict in ***
Automatic merge failed; fix conflicts and then commit the result.
  • Manual fix merge conflict, then add and commit
git add .
git commit
git push origin feature
  • Merge "feature" into "master" by making PR on GitHub.

In short, TIL git merge. I have never tried merging in local before. Not really how to fix merge conflict in remote. This might be related.