Search code examples
gitseleniumdirectoryignoretilde

How do GIT ignore directory with only char "tilde"


I use Selenium with Protractor and Cucumber, to create automated tests for my projects. These projects are versioned on GIT and a particular configuration of tests files create a folder named with only char "tilde".

I try to modify ignore file .gitignore on root when placed this directory created with only char "tilde" on name, but GIT no ignore that directory and her files.

What I do to force GIT ignore directory?


Solution

  • Just ignore ~ or ~/:

    $ git status --short 
    ?? ~/
    
    $ echo \~/ >>.gitignore 
    
    $ git status --short 
     M .gitignore