그룹 프로젝트에서 작업 중이고 모든 메모리에서 파일을 제거하고 싶습니다. 내용, 파일 이름, 모든 것! 나는 Git repo에 남아있는 어떤 흔적도 원하지 않는다. 나는 이것을 bfg
을 사용하여 수행하려했지만 Github 페이지에서 "이 시점에서 저장소를 찾아보기 기능"을 사용하여 파일을 찾을 수 있습니다.BFG로 파일을 지운 후에 GitHub 기록에서 파일을 볼 수있는 이유는 무엇입니까?
망할 놈의 repo가 .../electricity_profiles
하고 했다가 디렉토리 electricity_profiles/data
내에 디렉토리 내가 제거 할 파일 (나는 bfg --delete-files .~lock.smart_meter_data_overlap.csv#
을 시도했습니다). 이후로 현재 커밋에서 제거했습니다. 그러나 이는 약간의 커밋입니다. commit 5c50c67d1be4e869bc75fb7d3916b9fc814b8106
.
이 파일이 github에서도 존재한다는 증거를 모두 제거하려면 어떻게해야합니까? 그러면 다른 사람들이 파일을 가져 오면 볼 수 없습니다.
나는 살펴 보았다 :
- Could not remove sensitive data
- Inspect git repo after using BFG repo-cleaner
- How do I properly remove sensitive data pushed to a Git repo?
하지만 아직 파악하지 않았습니다.
지금까지 수행 된 작업 : (작동하는 것처럼 보임).
git clone --mirror https://github.com/oliversheridanmethven/electricity_profiles.git
bfg --delete-files .~lock.smart_meter_data_overlap.csv# electricity_profiles.git
콘솔 출력 :
Using repo : /home/user/Documents/InFoMM/case_studies/trial/electricity_profiles.git
Found 20 objects to protect
Found 2 commit-pointing refs : HEAD, refs/heads/master
Protected commits
-----------------
These are your protected commits, and so their contents will NOT be altered:
* commit 1b1eef47 (protected by 'HEAD')
Cleaning
--------
Found 22 commits
Cleaning commits: 100% (22/22)
Cleaning commits completed in 141 ms.
Updating 1 Ref
--------------
Ref Before After
---------------------------------------
refs/heads/master | 1b1eef47 | 9701a5b7
Updating references: 100% (1/1)
...Ref update completed in 26 ms.
Commit Tree-Dirt History
------------------------
Earliest Latest
| |
......D..D..m.m.mmmmmm
D = dirty commits (file tree fixed)
m = modified commits (commit message or parents changed)
. = clean commits (no changes to file tree)
Before After
-------------------------------------------
First modified commit | 5c50c67d | ff47bcdf
Last dirty commit | 9671f6ad | f6d36763
Deleted files
-------------
Filename Git id
------------------------------------------------------
.~lock.smart_meter_data_overlap.csv# | 7cf2b24f (92 B)
In total, 14 object ids were changed. Full details are logged here:
/home/user/Documents/InFoMM/case_studies/trial/electricity_profiles.git.bfg-report/2017-01-18/11-48-37
BFG run is complete! When ready, run: git reflog expire --expire=now --all && git gc --prune=now --aggressive
이 과정을 마무리.
cd electricity_profiles.git
git push --mirror https://github.com/oliversheridanmethven/electricity_profiles.git
Github 레보를 보면 작업 한 것으로 보입니다.
당신은 해당 분기의 역사를 다시 작성하고 파일을 제거해야합니다 : GitHub의 단지 GC가 주기적으로, 너무 오래된 커밋 이후 몇 시간 동안 계속 볼 수 있습니다 않습니다 그것이 나타나는 모든 커밋에서. –
나는 지금까지 커밋 된 것 중 하나라고 생각하지만, 일반적으로 달성하고자하는 것입니다. – oliversm