私はグループプロジェクトに取り組んでおり、すべてのメモリからファイルを削除したいと考えています。内容、ファイル名、すべて!私はGitのレポに残っているこの痕跡を残したくない。私は、この使用してbfg
をやろうとしてきたが、私はまだそれが「は、履歴機能のこの時点でリポジトリを閲覧する」のです使用してGithubのページ上のファイルを見つけることができます。BFGでファイルをクリーニングした後も、GitHubの履歴にファイルが表示されるのはなぜですか?
Gitのレポであるディレクトリは.../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レポを見ると、うまくいったようです。
あなたはその枝の歴史を書き換えると、ファイルを削除する必要がありますそれが現れるすべてのコミットから。 –
これまでのところコミットしていると思うのですが、それは一般的に達成したいことです。 – oliversm