git checkout -b origin/<dev-branch>
git rebase -i HEAD~<number-of-commits-in-dev-branch>
- mark the first commit as "pick" and the others as "squash"
git push origin <dev-branch>
- use
--force
if necessary
git checkout <dev-branch>
git merge <base-branch>
- then resolve conflicts using text editor
git add <resolved-file-dir>
- add resovled files
git commit -m "message"