1

I want my .gitignore to ignore every bin folder except the one in the PSFramework folder and keep that one's content. I managed to get the folder but its content doesn't show up.

Here is what I tried:

[Bb]in/
!**/PSFramework/[Bb]in/

Tried it with and without the slash at the end. According to what I found until now this should work but for me, it doesn't :
when i check the git status only the folder but not the files in it show up

LeGEC
  • 46,477
  • 5
  • 57
  • 104
b0neng4
  • 76
  • 7
  • 1
    What do you mean by "its content doesn't show up"? Where doesn't it show up. The gitignore file you show works for me locally just fine. – Joachim Sauer Apr 21 '21 at 12:12
  • When i check the git status only the folder but not the files in it show up – b0neng4 Apr 21 '21 at 12:15
  • 2
    That's normal when a folder isn't tracked by git at all: it'll just list the whole directory as untracked as opposed to each individual file within it. If you `git add wherever/PSFramework` you should see all the files in the next `git status` call. – Joachim Sauer Apr 21 '21 at 12:18
  • @b0neng4 : that's just git status, which "sums up" its output by default. The option to list individual files within a directory is : `git status -uall` (it *is* explained in the doc of [`git status`](https://git-scm.com/docs/git-status#Documentation/git-status.txt--ultmodegt), and it *is* not obvious :) ) – LeGEC Apr 21 '21 at 12:19
  • Thanks, didn't know that. Worked. – b0neng4 Apr 21 '21 at 12:22
  • @b0neng4 : can you take 2 minutes to add the output of `git status` to your question ? – LeGEC Apr 21 '21 at 12:23

0 Answers0