Quantcast
Channel: git ignore exception - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Answer by Aidin for git ignore exception

$
0
0

For Nested Folders, I came up with a solution based on Matiss's answer.

Let's say I want to ignore everything in build/ directory (which is in /app). So I do:

build/*

However, if I want to exclude build/outputs/bundle/release subfolder, I need to play some hide and seek!

/app/build/*!/app/build/outputs/app/build/outputs/*!/app/build/outputs/bundle/app/build/outputs/bundle/*!/app/build/outputs/bundle/release

Important Notes:

  • All the paths should start with / and be relative to the .gitignore
  • You have to do it one subfolder at a time. You can see in VS Code (for instance) what it includes and what not at every step.

Viewing all articles
Browse latest Browse all 13

Trending Articles