1

I have 2 git repos, I have for example folder1. When i do git rm --cached folder1 and then push the changes and then pull them from the other repo, it deletes them from the other repo. I have added it previously however I no longer with to track the files in this folder. Is there an easy way to remove them from the git inex on both sides without actually deleting them?

1 Answer 1

1

If you want to stop tracking changes in a sub-folder in your local copy do this:

git update-index --assume-unchanged <files/to/stop.tracking> 

To reverse that do:

git update-index --no-assume-unchanged <files/to/stop.tracking> 

Read more here.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.