0

I use the following text in .gitignore to ignore everything except some files that I want to track.

# Ignore everything
*

# But not these files...
!.gitignore
!README.md



# ...even if they are in subdirectories
!*/

However, when i git add -A, another README.md file in one of the subdirectories are also tracked. How can I circumvent this?

arvchi
  • 61
  • 11

1 Answers1

-1

How to exclude file only from root folder in Git

Following this example and placing it under exceptions should do the trick

Might have to refresh your tracked list using:

git rm --cached filename
Rich
  • 63
  • 1
  • 5