Skip to content

Commit

Permalink
add reminders to pull
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorsector committed Jan 19, 2024
1 parent aa59690 commit 222a784
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
22 changes: 15 additions & 7 deletions .github/steps/2-remove-file-history.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,30 @@ There are multiple tools available for removing Git history, we'll use BFG Repo-

### :keyboard: Activity: Use BFG Repo-Cleaner to remove the `.env` file

1. Install BFG Repo-Cleaner on your machine. You can follow the [instructions on the web site](https://rtyley.github.io/bfg-repo-cleaner/) to do so or you can use a package manager for your operating system.
2. Confirm the `.env` file is removed from the root directory. THe command should return empty.
1. Update the local copy of your repository to ensure you have the most recent version of the course files.
```shell
git pull
```
2. Install BFG Repo-Cleaner on your machine. You can follow the [instructions on the web site](https://rtyley.github.io/bfg-repo-cleaner/) to do so or you can use a package manager for your operating system.
3. Confirm the `.env` file is removed from the root directory. The command should return empty.
```shell
find . -name ".env"
```
3. Search for .env in the repository's history. The command should return at least 2 commits: the addition of `.env` when you copied this template repository, and the removal of `.env`.
4. Search for .env in the repository's history. The command should return at least 2 commits: the addition of `.env` when you copied this template repository, and the removal of `.env`.
```shell
git log --stat --all -- .env
```
4. Use BFG Repo-Cleaner to delete all references to `.env` that exist in the repository.
5. Use BFG Repo-Cleaner to delete all references to `.env` that exist in the repository.
```shell
bfg --delete-files .env
```
5. The tool will run and make some suggestions about some follow-up commands. Run those to get your local repository cleaned up.
6. Push your changes to GitHub. Note we're using the `--force` argument in this step since we're altering Git history.
6. The tool will run and make some suggestions about some follow-up commands. Run those to get your local repository cleaned up.
7. Repeat the sarch for .env in the repository's history. This time, the command should return empty.
```shell
git log --stat --all -- .env
```
8. Push your changes to GitHub. Note we're using the `--force` argument in this step since we're altering Git history.
```shell
git push --force
```
7. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
9. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
14 changes: 9 additions & 5 deletions .github/steps/3-add-env-to-gitignore.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ We'll now configure Git so it ignores a future addition of sensitive content by

### :keyboard: Activity: Add `.env` to `.gitignore`

1. Locate the file we added to the repository titled `.gitignore`.
2. Add `.env` to the file.
3. Stage, commit the file:
1. Update the local copy of your repository to ensure you have the most recent version of the course files.
```shell
git pull
```
2. Locate the file we added to the repository titled `.gitignore`.
3. Add `.env` to the file.
4. Stage, commit the file:
```shell
git add .gitignore
git commit -m "ignore .env files"
```
4. Push the file to GitHub.com
5. Push the file to GitHub.com
```shell
git push
```
5. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.
6. Wait about 20 seconds then refresh this page (the one you're following instructions from). [GitHub Actions](https://docs.github.com/en/actions) will automatically update to the next step.

0 comments on commit 222a784

Please sign in to comment.