用 iCloud 同步 Git 目录遇到的问题

2021-02-25 18:35:53 +08:00
 guyeu

迫于曾经磁盘故障数据丢失的血泪教训,换电脑之后直接把重要数据放进了 iCloud 同步目录,然后切分支的时候,代码目录出现了大量的filename 2.ext文件及文件夹,想知道有啥办法可破

2836 次点击
所在节点    iCloud
11 条回复
ruike007
2021-02-25 18:40:57 +08:00
弄个别的同步软件呀,syncthing/ nextcloud 等
gaopu
2021-02-25 18:47:30 +08:00
为什么要用 icloud 同步 git 的代码,为什么不用 github 等类似服务同步 git 的代码
IgniteWhite
2021-02-25 19:03:08 +08:00
在网盘里直接放 repo 出大问题!需要用工具来把网盘配置成 git remote,来避免 git 和网盘同时同步文件造成的冲突。

我用的是 dropbox,用这个工具来设置 git remote: https://github.com/anishathalye/git-remote-dropbox 至于 icloud,应该也有类似工具
IgniteWhite
2021-02-25 19:14:02 +08:00
@IgniteWhite 我搜索了一下,没有找到能以 iCloud 做 remote 的办法或者工具。
guyeu
2021-02-25 19:37:46 +08:00
@gaopu
@IgniteWhite 因为有大量的不被 git 管理的文件(未提交内容、私人脚本、IDE 配置等)。
IgniteWhite
2021-02-25 19:49:31 +08:00
@guyeu 嗯嗯,我是把配置文件放到 github,私人项目放到 dropbox,都用 git
dingwen07
2021-02-26 02:53:42 +08:00
不要用网盘同步代码
既然有 git 那也不需要网盘备份了吧
JasperYanky
2021-02-26 09:15:21 +08:00
不同步 .git 文件夹?
类似这样 https://github.com/HaoChuan9421/nosync-icloud
PPing520
2021-02-26 09:31:48 +08:00
同步镜像库
ooops
2021-02-26 12:34:06 +08:00
IDE 配置可以提交啊,反正你自己的分支 然后再 reset 也行。怕别人看到你自己 fork 下不就行了。
WillBC
2021-02-26 22:57:34 +08:00
我是以 GitHub 为主,iCloud 为辅,本地为源。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/756285

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX