Resync git repo with new gitignore file

After adding .gitignore file use following commands
[crayon-5e2c7a7e0b085996931411/]

Make sure to commit first your changes you want to keep. The –cached option will keep your files untouched on your disk though.

Other more solution:
[crayon-5e2c7a7e0b097528567652-i/]

Files with space in their paths

In case you get an error message like fatal: path spec ‘…’ did not match any files, there might be files with spaces in their path. You can remove all other files with option –ignore-unmatch:

[crayon-5e2c7a7e0b0a2108261362-i/]

But unmatched files will remain in your repository and will have to be removed explicitly by enclosing their path with double quotes:

[crayon-5e2c7a7e0b0ab997035892-i/]

Nishant Vaity

I am Software Engineer, Technology Mentor & Entrepreneur. I am passionate about the technologies I use and always eager to share & learn more from that passion. I am an experienced Software Engineer with 8+ years of experience in coding high-traffic websites. Proficient in HTML, JavaScript, jQuery, CSS with LAMP / MAMP / WAMP Stack. Contributor for WordPress open source plugins and Translator (Marathi) for WordPress 4.5.x.

%d bloggers like this: