Hi,
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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:
SourceTree_2016-03-09_13-44-59.png
There are several methods for resolving conflicts: the one you are interested in is "Resolve using "Mine"
Nomenclature:
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a very clear description of what I've always found to be very ambiguous terms.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a result of my poor english: describing complicated things with a very small vocabulary.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That is a clear explanation. Thank you.
(I did hope there would be a way to do that for all files, rather than have to do each one individually.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.