For reasons that are boring and probably irrelevant, I have ended up with a lot of merge conflicts in my current project. I know 100% that the local files on my machine are all correct. Is there a quick way to tell SourceTree/Git that I want to resolve all conflicts by taking the current local version of all the files?
Any help would be very much appreciated.
Kind wishes ~ Patrick
@Patrick Skelton: As you are looking for a recipe to use "mine" for all of your files at once, have a look here:
Haven't tested tis recipe - but it looks exactly what you are looking for. Personally I prefer doing it individually - as I don't trust those mass operations, as I'm afraid they might harm anything unexpected... (**PARANOIA**)
Hi, @Johannes Kilian
Not as paranoid as me after yesterday, when I ended up having to destroy an entire repo and re-add the whole project (effectively wiping its history) because I got in such a mess doing a 3-way merge. Luckily, I am the only one working on it at the moment, and I keep a 'Release Notes.txt' as part of the project.
Ironically, I think the script above would make me less paranoid. I knew my local version was correct, so all I wanted to say to SourceTree/Git was, 'Look, I don't care what differences you find, don't touch the current version of files in my project.'
Thanks for the link.
There are different methods to solve conflicts: Right click on the conflicted file within Sourcetree and you see a drop down menu to access methods resolving conflicts:
There are several methods for resolving conflicts: the one you are interested in is "Resolve using "Mine"
As I'm are trying to merge "foreign" ("their") changes into "my" repository, the following wording is used:
"Resolve using "Mine"" overwrites the result of the merge with my pre-merge version - their remote changes are ignored.
"Resolve using "Theirs"" overwrites the result of the merge with their pre-merge version - my local changes are ignored
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG