rsync .git目录 [英] rsync .git directory
问题描述
这个问题可能是基于我对.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屋!