Skip to content

Commit 96c769c

Browse files
committed
Add solution for question 2
1 parent 3f5e6c2 commit 96c769c

File tree

1 file changed

+16
-0
lines changed
  • Anirudh/missing_semeter_git/question1/Anirudh/missing_semeter_git/question2

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
task is to remove a sensitive file from git history
2+
3+
1. Created a test repo with git init
4+
2. Added a file secret.txt with sensitive data
5+
3. Committed it by mistake
6+
4. Used git filter-repo to completely remove it from history:
7+
Command:
8+
git filter-repo --path secret.txt --invert-paths
9+
5 again had to use it by force
10+
Command:
11+
git filter-repo --path secret.txt --invert-paths --force
12+
13+
14+
6. Verified using:
15+
git log --all -- secret.txt
16+

0 commit comments

Comments
 (0)