Ignore the Junk
Write a .gitignore so build artifacts and logs stay out of history.
A beginner Git challenge worth 3 points. Solve it hands-on in a real Git environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: The Node project in /tmp/app has index.js, a node_modules/ folder, and a debug.log.
Only your source belongs in Git.
Tasks:
- Create a
.gitignorethat ignoresnode_modules/and*.log - Commit
index.jsand.gitignore node_modules/anddebug.logmust not be tracked
Commands to learn: .gitignore, git add, git status
Run check when done.