Leave It Out
The file secrets.env holds a password and must never be committed. Make Git ignore it: write a .gitignore file that names it, and commit that file with the message ignore the secrets.
Example 1
starts as
* 0f91f48 (HEAD -> main) add the app untracked: secrets.env
ends as
commits, newest first: ignore the secrets add the app files in the latest commit: .gitignore app.py staged: nothing changed, not staged: nothing untracked: nothing
Constraints
- 1 to 4 commits
secrets.envis untracked, and there is no.gitignoreyet
Write it in your browser, against the clock. The model script, with a note on each command it uses, comes after.
More Git problems
- Merge the BranchEasy
- One File Was Left OutEasy
- Rename a FileEasy
- Send It UpEasy
- Tag the ReleaseEasy
- Undo the EditEasy
- Unstage ItEasy
- What Is StagedEasy