Closed github-learning-lab[bot] closed 2 years ago
Uh oh @SongBie-CKP, something went wrong! I wasn't expecting this change. Please go over the instructions again and make sure you've followed them as exactly as you can.
If this is a pull request, so you can keep editing the file here. Keep trying, you'll get there!
If you would like help troubleshooting, create a post on the GitHub Community board. You might also want to search for your issue to see if other people have resolved it in the past.
This looks great @SongBie-CKP, thanks for adding a .env
file to the .gitignore
. Feel free to add any other file or potential sensitive data to the .gitignore
file.
Congratulations, you've done it @SongBie-CKP! Go ahead and delete the branch.
Taking advantage of the
.gitignore
file for securityFrom time to time, there are files you don't want Git to check in to GitHub. You may want to ignore files that contain sensitive credentials or information which should not be pushed to your repository. There are a few ways to tell Git which files to ignore.
Ignoring files
Git uses a file called
.gitignore
to decide which files and directories to ignore when committing. Keep files containing sensitive data, like configuration orenv
files, out of your repositories. This is one way to promote security best practices.The
.gitignore
file can, and should, be committed into your repository. By sharing this file and making it part of your code, it will also help others. Other users that contribute to the repository will also avoid committing sensitive data. There are many examples of.gitignore
files available for you to use in your own repositories. You can find them in the gitignore repository.Step 5: Ignore files
In this pull request, I'm adding a
.gitignore
file. Files ending with.env
commonly include sensitive data. This helps you keep files with sensitive data secure and private. Let's add those files to the.gitignore
.:keyboard: Activity: Updating the .gitignore file
...
) in the right upper corner and click Edit file to edit the.gitignore
file..env
to line 1.Scroll down, and commit your change.
For a printable version of the steps in this course, check out the Quick Reference Guide.
Return to this pull request for my next comment.