Skip to content

Fix 145 append gitignore #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

swayam1604
Copy link

Summary

This PR fixes Issue #145 by modifying codespace.sh to append default .gitignore entries only if they are not already present. This prevents overwriting student-defined rules during Codespace rebuilds.

Changes

  • Added append_if_missing() shell function
  • Ensured .gitignore is created if it doesn't exist
  • Appends default rules (*, !.gitignore, node_modules/, etc.) without duplicates

Tested

  • Existing .gitignore preserved ✅
  • Default entries appended once ✅
  • No duplicates or overwritten content ✅

cc @stephendgilbert

@swayam1604
Copy link
Author

swayam1604 commented Jun 24, 2025

cc @dmalan @rongxin-liu

email - [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Would it be possible to keep any existing .gitignore
1 participant