rsync .git目录 [英] rsync .git directory

查看:138
本文介绍了rsync .git目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题可能是基于我对.gits和git仓库的角色缺乏理解,但是:



我可以rsync一个目录,其中包含我在 git init 之间创建的内容?

我的笔记本电脑上有一个存储库,只有这样才能从远程主机上将scp / rsync传送到远程主机,我可以从中重新下载它。我可以rsync这些主机之间的完整目录结构吗?

解决方案

是的,这是可能的。 IIRC,git使用相对的方法。所以与其他电脑同步是安全的。


This question probably is based on my lack of understanding of the role of .gits and git repositories in general but:

Can I rsync a dir with content that I created with git init between machines ?

I have a repository on my laptop, and the only way to get it away from there is scp/rsync to a remote host, from which I can download it again. Could I rsync the complete directory structure between these hosts?

解决方案

Yes, that is possible. IIRC, git uses a relative approach. So it's safe to sync it with another computer.

这篇关于rsync .git目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆