3

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.

undefined
  • 6,366
  • 12
  • 46
  • 90

2 Answers2

1

You can acheive it in following setps

  1. You need to remove the folders (Keep a backup of the folders if you want the contents)

  2. update the gitignore by removing (!), add and commit the changes

  3. Replace the backup if you need

SAMUEL
  • 8,098
  • 3
  • 42
  • 42
1

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.

samrat shakya
  • 135
  • 1
  • 8