Reputation: 6884
I have the following lines in my gitignore
file:
!/assets/path-one/**/*.*
!/assets/path-two/**/*.*
!/assets/path-three/**/*.*
I pushed the changes, and all the files are included in the commit. What I want is to remove the !
and remove all the files from the commit, how can I do this?
/assets/path-one/**/*.*
/assets/path-two/**/*.*
/assets/path-three/**/*.*
When I update the file, I see only the changes in the .gitignore
file.
Upvotes: 3
Views: 817
Reputation: 8562
You can acheive it in following setps
You need to remove the folders (Keep a backup of the folders if you want the contents)
update the gitignore by removing (!
), add and commit the changes
Replace the backup if you need
Upvotes: 1
Reputation: 135
First commit your changes and Try removing cache:
git rm -r --cached .
git add .
git commit -m "fixed untracked files"`
This might help you: https://stackoverflow.com/a/11451731/8866182.
Upvotes: 1