UNABLE TO WORK WITH .gitignore I Did this: created a file called .gitignore in the root of the project that is under C:/dinesh/vidhan--> (inside vidhan) here I ceated .gitignore and added *.class target/ *.iml .idea/ these stuffs in the file But when executed the command git add .gitignore it shows the error message fatal : pathspec '.gitignore' did not match any files Source Getting started with Git: a comprehensive guide for newbies