gitignore issue

Discussion in 'Programming' started by bumbar, Jul 7, 2021.

  1. #1
    Hello,

    I know the question is not for here, I did not find a suitable section.

    So,
    I have
    test.php
    index.php
    index.php_back
    index.php07.2021
    foo.js

    all files that have a .php extension, but those .php_back .php072021, etc. I do not want

    here is terminal command that work
    find .|grep -e "\.php$"
    But in .gitignore file this regex pattern do not work.

    Any help, please.
     
    Solved! View solution.
    bumbar, Jul 7, 2021 IP
  2. #2
    .gitignore:
    
    *.php*
    !*.php
    
    Code (markup):
     
    FrogeHost, Jul 8, 2021 IP