Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Rad-98 opened this issue May 18, 2023 · 0 comments
Open

Comments

@Rad-98
Copy link

Rad-98 commented May 18, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant