由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Hardware版 - 用git来备份重要文件怎样
相关主题
有没有超小型的PC?上了回八阕,似乎又中招了。
t450s 温8系统升级真心急问IT专家---在线等!
请问Win10Pad怎么把SD卡变成固定硬盘T410突然蓝屏,然后找不到硬盘。。。 (转载)
pogoplug pro 还真不错问个硬盘分区的问题
请教大侠高手们一个问题急问,恢复删除的文件 (转载)
The Official Windows 7 Repository求教:我的硬盘还有救吗?
【SOS】完了,RAID0挂了!!!请为家用服务器推荐一个备份的软件
突然UBS闪存的文件不可见了不知道发这问对不对...电脑突然变卡(也不是说完全变卡)
相关话题的讨论汇总
话题: git话题: repo话题: bare话题: files话题: folder
进入Hardware版参与讨论
1 (共1页)
z*********e
发帖数: 10149
1
像gitlab这种,一个repo可以放10gb
有什么明显的优缺点吗
F***Q
发帖数: 6599
2
I have been using git to manage my core files (almost everything, except
pictures, downloads, and big data files) since 2010. really happy that I
made that choice.
My repository (bare) has grown from from 3GB to 8GB (you will be surprised
how slow your real creations grow once you start organizing your files).
Once you checkout a copy, the total git folder is about 2x of the bare repo
size - to me, is about 16 GB plus un-tracked files (mostly those do not
worth version control).
There are a few noticeable benefits using a git to manage your files
1. apparent, you have everything - every file change, every history etc, you
can go back and forth anywhere, any time.
2. your data are naturally backed up - every computer with a working git
folder is a self-contained complete copy of your files; you will never be
afraid of losing your data again.
3. blazing fast! git is designed to work with large projects. It is almost
effortless to manage my 8GB repo (60k files). The only thing you will need
is to make sure your git folder is located on an SSD! On my laptop, a "git
status" takes less than a second.
4. apparently, you also get all the benefits of git - branching, merging,
tagging, diff-ing, ...
There were some learning curves, but after practicing, you will like the way
it is. My repos are stored on Linux, Mac and Windows (use TortoiseGit).
Once you set up the repo, and smooth the wrinkles (such as setting up the
newline/file permissions), it is smooth sail afterwards.
d****n
发帖数: 12461
3
馊主意:
1. repo会很大,每次回滚都是zip/unzip
2. binary没法diff
3. lfs问题多多

【在 z*********e 的大作中提到】
: 像gitlab这种,一个repo可以放10gb
: 有什么明显的优缺点吗

F***Q
发帖数: 6599
4

by the way, you don't need a gitlab/github to use git. those are just web
interfaces. you can convert any folder on your disk to a git repository!
here is how I did mine, first, find a server (a machine you use to exchange
data) that runs an ssh server, use
mkdir gitreponame
cd gitreponame
git --bare init
to create a bare repository, then from any other machine, you clone a copy
from this bare repo by
git clone ssh://youraccount:myserve.com:/path/to/gitreponame gitrepo
then you do your git stuff, after you are done, run "git commit" and "git
push". That will upload your changes to the bare repo. Then, another machine
can checkout the latest changes from the bare repo by "git pull". that's it
.

【在 z*********e 的大作中提到】
: 像gitlab这种,一个repo可以放10gb
: 有什么明显的优缺点吗

F***Q
发帖数: 6599
5

no way. you can git checkout to any past hash
I don't care. why would I diff a binary?
this is git, not LFS!

【在 d****n 的大作中提到】
: 馊主意:
: 1. repo会很大,每次回滚都是zip/unzip
: 2. binary没法diff
: 3. lfs问题多多

j********2
发帖数: 4438
6
不咋样,git删掉的文件还在历史commit里面,时间长了仓库目录会非常大。看着不断
增长的目录,慢慢会有一种无力感

【在 z*********e 的大作中提到】
: 像gitlab这种,一个repo可以放10gb
: 有什么明显的优缺点吗

j********2
发帖数: 4438
7
个人感觉最完美的备份方式是zfs snapshot,省心省力

【在 z*********e 的大作中提到】
: 像gitlab这种,一个repo可以放10gb
: 有什么明显的优缺点吗

n*********u
发帖数: 1030
8
大量小文件的话,git很好。
小量大文件的话,resilio sync这些比较好,torrent是把大文件分块来同步的,小改
动不需要更新整个文件。
傻瓜方法就是花点钱dropbox。
t*****g
发帖数: 5282
9
dropbox可以免费弄成25G啊
z*********e
发帖数: 10149
10
zfs除了freenas,个人用户很难用到吧

【在 j********2 的大作中提到】
: 个人感觉最完美的备份方式是zfs snapshot,省心省力
z*********e
发帖数: 10149
11
我想主要是文档这类,更新比较快,文件也不大,打算搞个repo专门放,照片视频什么
的用nas+外置硬盘就好了,一个月整理一次

【在 n*********u 的大作中提到】
: 大量小文件的话,git很好。
: 小量大文件的话,resilio sync这些比较好,torrent是把大文件分块来同步的,小改
: 动不需要更新整个文件。
: 傻瓜方法就是花点钱dropbox。

F***Q
发帖数: 6599
12

git runs "git gc" whenever it feels necessary. the .git folder keeps pretty
much the same size as your working folder.
there are many ways to permanently purge deleted files, you can use git
filter-branch, git rebase, or bfg
http://stackoverflow.com/questions/307828/completely-remove-file-from-all-git-repository-commit-history
https://rtyley.github.io/bfg-repo-cleaner/

【在 j********2 的大作中提到】
: 不咋样,git删掉的文件还在历史commit里面,时间长了仓库目录会非常大。看着不断
: 增长的目录,慢慢会有一种无力感

E***r
发帖数: 1037
13
用群辉那个 cloud station drive
同步到自己 nas 的一个 shared folder
让那个 shared folder 自动做 btrfs snapshots 就好了
自己设置 retention policy
1 (共1页)
进入Hardware版参与讨论
相关主题
不知道发这问对不对...电脑突然变卡(也不是说完全变卡)请教大侠高手们一个问题
紧急求助:添加新硬盘导致无法启动The Official Windows 7 Repository
谁推荐一个网络备份软件?WINDOWS的【SOS】完了,RAID0挂了!!!
换了ssd, 原来机器自带的硬盘大家都怎么处理?突然UBS闪存的文件不可见了
有没有超小型的PC?上了回八阕,似乎又中招了。
t450s 温8系统升级真心急问IT专家---在线等!
请问Win10Pad怎么把SD卡变成固定硬盘T410突然蓝屏,然后找不到硬盘。。。 (转载)
pogoplug pro 还真不错问个硬盘分区的问题
相关话题的讨论汇总
话题: git话题: repo话题: bare话题: files话题: folder