2. 2
About Speaker
Lee You-Tang → Lee or YodaLee
Programmer: free software enthusiast.
Hello Tokyo
3. 3
The Git
Version control tool (?)
Every files is completely saved, unlike other VC
Never loss any data easily
4. 4
Look into .git
Reference
log
Commit data Reference
Info
Packed
Reference
5. 5
Save data: If you do this
$ git reset --hard HEAD~1
The commit data is un-referenced, but reference
log is still there
See the reference log by:
$ git reflog
6. 6
What if delete reflog?
$ git branch -D some-branch
$ rm -Rf .git/logs/
There is still some way to save them, we can
check repository integrity with git fsck.
7. 7
So how about the deleted files?
Git do 'git gc --auto' in period automatically, it will...
Pack the loose file
refs->packed-refs
Delete the
nonreference files.
8. 8
Do Not...
Add and commit a large file into git.
Every contributer will download the file when
clone the repository.
To delete the file will be a hard work, and do so
will inevitable change the history.
10. 10
A live demonstration to delete files
Git filter-branch: vastly change git history
git filter-branch [type] [script] [range]
Git gc: force garbage collection
!!! DON'T do this if your repository is popular !!!
You WILL have to notify every contributors to
merge your repository again