Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (12.7k points)
My git workspace is dirty, there are some local modifications. When I use command git pull origin master it works fine because there is no conflict.

But when I'm trying to use Ansible like git: repo=xxxx dest=xxx version={{branch}} I got error:

Local modifications exist in repository (force=no)

If I add force=yes, then I will lose my local modifications.

What can I do to keep my local changes and pull latest commit from git by using Ansible git module.

1 Answer

0 votes
by (29.5k points)

You cannot achieve it using the git module. the only way is using shell command or try to keep a clean workspace

Browse Categories

...