maks / MGit

A Git client for Android.
https://manichord.com/projects/mgit.html
GNU General Public License v3.0
1.25k stars 167 forks source link

How can I give the recursive strategy to pull and pass "ours" as an option? #689

Open Rad-98 opened 1 year ago

Rad-98 commented 1 year ago

I wrote my code in this way, but it only works for content and not for folders :

PullResult pullResult = git.pull().setStrategy(MergeStrategy.RECURSIVE).setContentMergeStrategy(ContentMergeStrategy.OURS).setCredentialsProvider(cp).call();

The program is like this: I move folder "1", which contains the properties file, to folder "2" and push that. At the same time, I transfer the same folder to folder 3 on another device, and after syncing, it is present in both folder 2 and folder 3. I don't want it like this. and only the latest changes (transfer to folder 3) should be applied.

Can anyone guide me?