We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

What to Ignore

We've talked about how to ignore files, but the deeper question is what should you ignore? Here are some rules of thumb for coding projects:

  1. Ignore things that can be generated (e.g. compiled code, minified files, etc.)
  2. Ignore dependencies (e.g. node_modules, venv, packages, etc.)
  3. Ignore things that are personal or specific to how you like to work (e.g. editor settings)
  4. Ignore things that are sensitive or dangerous (e.g. .env files, passwords, API keys, etc.)

Part Deux

We've covered a lot of Git basics so far. There's certainly more you can learn, but now you have a solid foundation to work with as a developer. If you want more, there is a Part 2 of Learn Git where we cover more advanced topics.

Assignment

Let's ignore a generated file. We ignore generated files because they can easily be regenerated from the stuff we do track. In this case, we're going to use Pandoc to generate HTML from a Markdown file. We'll ignore the HTML file, but commit the Markdown file.

  1. for Mac Users

    brew install pandoc
    

    for Linux/WSL Users

    sudo apt install pandoc
    
# WebFlyx: The Future of Content

You thought you knew what the web was capable of. You were _wrong_. WebFlyx is taking the world of online entertainment to an entirely new level. Grab a copy of it at your local electronics store today!

**Available on Floppy Disk!**

_While supplies last._
pandoc advert.md -o advert.html
  1. for Windows (WSL) Users

    explorer.exe advert.html
    

    for Mac Users

    open advert.html
    

    for Linux Users

    xdg-open advert.html
    

Run and submit the CLI tests from the root of the project.

Tip

If you accidentally staged or committed advert.html, adding it to the .gitignore file won't remove it from the repository. You'll need to remove it manually (at which point it will continue to be ignored going forward):

git rm --cached advert.html