Skip to content
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

submit git03 #1960

Open
wants to merge 1 commit into
base: caio-new-da
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions students/caiocezart/exercises/git03/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Secrets (c01-git04)

Perform the following commands:
1. In the same repository of the previous exercise:
2. Add a file called `my_env.txt` that contains
```
SERVICE_NAME=account-management
ENVIRONMENT=prod
PASSWORD=pass1234
```
1. Commit it to your local repository
2. Check the log with `git log`

**Questions**

1. Let's suppose you remotely pushed the `my_env.txt` file above. A colleague asks you to remove this information from Git. What's your colleague worried about?
2. If you modify the file in your workspace, then commit and push it, will it be enough to erase this password information from the repository? (It's not). Why?
3. If you delete the file and push it, then create a new one with the rest of the information, is it enough? (It's not). Why?
4. How to fix this? How do you remove something from Git history when it is in the remote repository?
5. Which commands would you use? Explain what the command does.

## Submit a PR with the following files

> Remember to follow the instructions on [how to submit a PR here](/README.md#exercises)

- **README.md**: copy from file [ANSWER.md](ANSWER.md), answering the questions above. Include details and commands used.
3 changes: 3 additions & 0 deletions students/caiocezart/exercises/git03/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"version": "v1.0.0"
}
3 changes: 3 additions & 0 deletions students/caiocezart/exercises/git03/my_env.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SERVICE_NAME=account-management
ENVIRONMENT=prod
PASSWORD=pass1234