2017-01-17 17 views
0

그룹 프로젝트에서 작업 중이고 모든 메모리에서 파일을 제거하고 싶습니다. 내용, 파일 이름, 모든 것! 나는 Git repo에 남아있는 어떤 흔적도 원하지 않는다. 나는 이것을 bfg을 사용하여 수행하려했지만 Github 페이지에서 "이 시점에서 저장소를 찾아보기 기능"을 사용하여 파일을 찾을 수 있습니다.BFG로 파일을 지운 후에 GitHub 기록에서 파일을 볼 수있는 이유는 무엇입니까?

망할 놈의 repo가 ​​.../electricity_profiles하고 했다가 디렉토리 electricity_profiles/data 내에 디렉토리 내가 제거 할 파일 (나는 bfg --delete-files .~lock.smart_meter_data_overlap.csv#을 시도했습니다). 이후로 현재 커밋에서 제거했습니다. 그러나 이는 약간의 커밋입니다. commit 5c50c67d1be4e869bc75fb7d3916b9fc814b8106.

이 파일이 github에서도 존재한다는 증거를 모두 제거하려면 어떻게해야합니까? 그러면 다른 사람들이 파일을 가져 오면 볼 수 없습니다.

나는 살펴 보았다 :

하지만 아직 파악하지 않았습니다.

지금까지 수행 된 작업 : (작동하는 것처럼 보임).

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 레보를 보면 작업 한 것으로 보입니다.

+0

당신은 해당 분기의 역사를 다시 작성하고 파일을 제거해야합니다 : GitHub의 단지 GC가 주기적으로, 너무 오래된 커밋 이후 몇 시간 동안 계속 볼 수 있습니다 않습니다 그것이 나타나는 모든 커밋에서. –

+0

나는 지금까지 커밋 된 것 중 하나라고 생각하지만, 일반적으로 달성하고자하는 것입니다. – oliversm

답변

2

저는 BFG의 저자입니다. "BFG로 파일을 정리 한 후 GitHub 기록에서 파일을 볼 수있는 이유는 무엇입니까?"라는 제목을 다시 붙였습니다. 그것은 당신의 문제를 더 잘 나타 내기 때문입니다.

귀하의 질문 설명이 완전히 명확하지 않습니다,하지만 난 BFG 실행에서 보고서에 추측하고는 BFG 는 BFG가 삭제에 대한 목표를 발견했다면, 그것은 것 ( 보고서가 삭제 한 파일을했다 오류로보고했는데 그걸 보지 못했다고 생각합니다. BFG에서 파일을 찾았고 기록에서 삭제 한 것 같습니다.)

첫째로, 당신은 특히, https://rtyley.github.io/bfg-repo-cleaner/#usage에 모든 단계를 수행하고 있는지 확인해야합니다 : 당신이 mirror의 repo

  • 을 청소했다

    • 당신은 GitHub에 다시이 청소 미러의 repo를 밀었다.

    모든 단계를 올바르게 수행 한 경우 BFG로 파일을 정리 한 후에 GitHub 기록에서 파일을 볼 수있는 이유는 무엇입니까? 가능한 설명은 GitHub가 아직 해당 저장소에서 가비지 수집을 수행하지 않았다는 것입니다.

  • +0

    나는이 정보가 작동하는 것 같아요. 프로젝트에 참여한 다른 사람이 이전 기록을 가져온 경우이 수정 사항이 앞으로 가져 오기/밀어 넣기에서 전파됩니까? – oliversm

    +0

    나는 언제나 1) 옛날 repo의 백업 사본을 가져 와서 우편 번호에 넣고 2) 모두에게 repo & re-clone의 오래된 사본을 지우도록 권한다. 그렇지 않으면 오래된 원하지 않는 데이터가 새 레포로 푸시되는 위험이 너무 커집니다. –