V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
guyeu
V2EX  ›  iCloud

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

  •  
  •   guyeu · 2021-02-25 18:35:53 +08:00 · 2789 次点击
    这是一个创建于 1127 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

    我用的是 dropbox,用这个工具来设置 git remote: https://github.com/anishathalye/git-remote-dropbox 至于 icloud,应该也有类似工具
    IgniteWhite
        4
    IgniteWhite  
       2021-02-25 19:14:02 +08:00 via iPhone
    @IgniteWhite 我搜索了一下,没有找到能以 iCloud 做 remote 的办法或者工具。
    guyeu
        5
    guyeu  
    OP
       2021-02-25 19:37:46 +08:00
    @gaopu
    @IgniteWhite 因为有大量的不被 git 管理的文件(未提交内容、私人脚本、IDE 配置等)。
    IgniteWhite
        6
    IgniteWhite  
       2021-02-25 19:49:31 +08:00 via iPhone
    @guyeu 嗯嗯,我是把配置文件放到 github,私人项目放到 dropbox,都用 git
    dingwen07
        7
    dingwen07  
       2021-02-26 02:53:42 +08:00 via iPhone
    不要用网盘同步代码
    既然有 git 那也不需要网盘备份了吧
    JasperYanky
        8
    JasperYanky  
       2021-02-26 09:15:21 +08:00
    不同步 .git 文件夹?
    类似这样 https://github.com/HaoChuan9421/nosync-icloud
    PPing520
        9
    PPing520  
       2021-02-26 09:31:48 +08:00
    同步镜像库
    ooops
        10
    ooops  
       2021-02-26 12:34:06 +08:00
    IDE 配置可以提交啊,反正你自己的分支 然后再 reset 也行。怕别人看到你自己 fork 下不就行了。
    WillBC
        11
    WillBC  
       2021-02-26 22:57:34 +08:00 via iPhone
    我是以 GitHub 为主,iCloud 为辅,本地为源。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5339 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 07:27 · PVG 15:27 · LAX 00:27 · JFK 03:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.