ignore all changes to dir

27 Views Asked by At

We have a git submodule, it's in a folder called 'config' in several repos.

I am getting this when doing a merge:

On branch oleg/feature/1537299444
Your branch is up to date with 'origin/oleg/feature/1537299444'.

Changes not staged for commit:
        modified:   config (modified content)

no changes added to commit

and it exits with 1.

How can I ignore all changes to the 'config' folder, which is a gitsubmodule?

I tried:

git checkout config

but that didn't do anything

1

There are 1 best solutions below

0
On BEST ANSWER

Try first to check what kind of of diff/new element you see in the submodule.

cd config
git status
git diff

If you can, do a git reset --hard in that config folder (if you don't need any local modification done in config)

Then go back to the parent repo, and retry your git merge.