Search code examples
gitatlassian-sourcetreemerge-conflict-resolution

sourcetree - how to quickly resolve multiple merge conflicts and use master code?


I need to merge my master branch with my development branch but there are soooo many conflicts as I have been working on the master and not updating the development branch.

Is there a quick way to resolve these? I simply want my development branch to be a copy of the master and am not too fussed about keeping the commits etc but am unable to delete the dev branch and start again.

I looked into doing a rebase but would have the same issues with conflicts.

UDATE**

Disaster!! Now I am unable to switch back to the master branch because of all the conflicts. I have tried stashing the merge but that gave an error. So I then used the 'Discard' button and discarded the file changes hoping this would go back to how it was but now when I try to checkout master I get the error, "The following untracked working tree files would be overwritten by checkout:".

Can anyone help me out? First and foremost I need to be able to switch to master. Forget about the merge!


Solution

  • Disaster!! Now I am unable to switch back to the master branch because of all the conflicts. I have tried stashing the merge but that gave an error. So I then used the 'Discard' button and discarded the file changes hoping this would go back to how it was but now when I try to checkout master I get the error, "The following untracked working tree files would be overwritten by checkout:". I'm in a pickle!! :(

    Run git merge --abort to put yourself back into the state you were before the conflicts appeared.

    I simply want my development branch to be a copy of the master and am not too fussed about keeping the commits etc.

    If you're not fussed about keeping the commits, you could just copy the files in master to a temporary location, checkout development then paste the contents of the temporary directory into your repository workspace?