Toggle navigation
首页
发现
Ask
User
登 录
注 册
Warm tip:
This article is reproduced from serverfault.com,
please click
backup
git
其他-完全备份git repo?
(其他 - Fully backup a git repo?)
发布于 2011-04-07 08:39:57
有没有简单的方法来备份包括所有分支和标签的整个git repo?
Questioner
Daniel Upton
Viewed
0
Original
English
7,983
2018-10-03 22:10:00
克隆它怎么办?
git clone --mirror other/repo.git
每个存储库都是其远程服务器的备份。
热门帖子
1
推荐一些好玩的/大众的手游
2
求指教后端项目迁移方案
3
迷你洗衣机是不是都是智商税?
4
求助一个排查了半年没解决的 MySQL order by 子句导致索引失效的问题, 500 多万条记录的小表要查快两分钟
5
个人开发了一款 WordPress 主题: iPao,集成了 AI 总结功能
6
偶然发现奇游加速器会在系统里植入根证书
7
国内有蒲公英替代品推荐吗?
8
语音助手这个东西真的会监听谈话并且上传,从而泄漏隐私吗?
9
出一些有意思的域名-明盘
10
jetbrains 全家桶升级 2024 后,在滚动代码时候感觉有点掉帧
热门github
1
A multi-platform library for OpenGL, OpenGL ES, Vulkan, window and input
(翻译:适用于 OpenGL、OpenGL ES、Vulkan、窗口和输入的多平台库)
2
Dev tool that writes scalable apps from scratch while the developer oversees the implementation
(翻译:可扩展开发工具的 PoC,该工具从头开始编写整个应用程序,同时开发人员监督实施)
3
shadcn/ui, but for Svelte. ✨
(翻译:shadcn-svelte是shadcn/ui的非官方社区主导的Svelte端口。)
4
The Python Risk Identification Tool for generative AI (PyRIT) is an open access automation framework to empower security professionals and machine learning engineers to proactively find risks in their generative AI systems.
(翻译:用于生成式 AI 的 Python 风险识别工具 (PyRIT) 是一个开放式访问自动化框架,使安全专业人员和机器学习工程师能够主动发现其生成式 AI 系统中的风险。)
5
Performance-portable, length-agnostic SIMD with runtime dispatch
(翻译:Highway 是一个提供可移植 SIMD/向量内在函数的 C++ 库。)
6
ZK Credo
(翻译:ZK信条)
7
OpenCodeInterpreter: Integrating Code Generation with Execution and Refinement
(翻译:OpenCodeInterpreter:将代码生成与执行和优化集成)
8
Joplin - the secure note taking and to-do app with synchronisation capabilities for Windows, macOS, Linux, Android and iOS.
(翻译:Joplin - 一个开源的笔记和待办事项应用程序,具有Windows,macOS,Linux,Android和iOS的同步功能。)
9
Mamba is a new state space model architecture showing promising performance on information-dense data such as language modeling, where previous subquadratic models fall short of Transformers. It is based on the line of progress on structured state space models, with an efficient hardware-aware design and implementation in the spirit of FlashAttention.
(翻译:Mamba 是一种新的状态空间模型架构,在信息密集型数据(例如语言建模)上显示出良好的性能,而之前的二次模型在 Transformers 方面存在不足。它基于结构化状态空间模型的进展,并本着FlashAttention的精神进行高效的硬件感知设计和实现。)
10
This repository contains System Design resources which are useful while preparing for interviews and learning Distributed Systems
(翻译:该存储库包含系统设计资源,在准备面试和学习分布式系统时非常有用)
11
Curso para aprender el lenguaje de programación Python desde cero y para principiantes. 75 clases, 37 horas en vídeo, código, proyectos y grupo de chat. Fundamentos, frontend, backend, testing, IA...
(翻译:从零开始学习 Python 编程语言的课程,适合初学者)
12
🎓 Path to a free self-taught education in Computer Science!
(翻译:🎓计算机科学免费自学教程!)
13
1️⃣🐝🏎️ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated with Java
(翻译:十亿行挑战 —— 使用 Java 对文本文件中的 10 亿行数据进行聚合的有趣探索)
14
A collective list of free APIs
(翻译:免费 API 的集合列表)
15
📚 Freely available programming books
(翻译:📚 免费提供的编程书籍)
@Daniel:如果克隆存储库,则将获取每个分支,但只有默认分支会被检出。尝试一下
git branch -a
。也许这样更明显:克隆存储库后,您无需获取每个分支,而是获取每个提交。分支仅引用现有的提交。如果他可以问这样的问题,我认为他非常了解克隆命令,这显然对他来说还不够(因为这是一个克隆,而不是转储)。转储是简单副本的不同之处,例如:1)对于正常工作,转储不需要是最佳的(甚至不是有能力的)2)但转储必须具有良好的抵抗力和可修复性,以防止数据损坏。
@peterh当然可以,但
git clone
涵盖了所有内容。(1)是可选的,不是必需的。如果结果仍然是优化的,它仍然是git本身已经覆盖的备份(2)。-我想说明的一点是,如果您git clone
已经涵盖了相关要点,那么您需要其他工具吗?尽管我也更喜欢git bundle
我,但我并不认为我的答案是错误的或无效的。您可以将两种方法都视为热备份与冷备份。那文件权限呢?git clone是否一定会复制过来?取决于我相信的选择