Giter Site home page Giter Site logo

Comments (7)

psjay avatar psjay commented on May 30, 2024

这样的话,会造成在下次重新执行 codest 之前,你本地删除的文件在远程删除不了,升级 rsync 会有什么问题吗?

from codest.

piperck avatar piperck commented on May 30, 2024

升级了之后就没有问题了,只是上来问下如果不升级能否有解决的办法。另外基于会删除远端文件这个特性。正常使用 rsync 只会增加不会删除远端文件吧。 能有个参数让 codest 像 rsync 一样别删除远端生成的文件吗。 因为使用类似构建的东西服务器构建,如果本地一同步代码服务器就给删了就血崩了。

from codest.

psjay avatar psjay commented on May 30, 2024

你可以把构建出来的东西放到 .gitignore 里(本来也应该在 .gitignore 中),codest 会根据你的 ignore 规则,选择性同步(所以也不会删除被你 ignore 的文件)。

from codest.

piperck avatar piperck commented on May 30, 2024

饿。在同步的时候完全有可能没有 .gitignore 文件吧。另外我试了一下我加入了 .gitignore 里面的文件夹还是会在远端被删除掉。比如我在服务器端构建出了 bin/ 文件夹 也在本地 .gitignore 里面申明了 bin/ 远端还是会被删掉。 作者有尝试过吗? 我觉得最好能有个参数能选择一下吧。特别是我在使用 -s 的时候。如果不加参数 watch 住似乎不会删掉,我现在只能暂时使用这个解决方案。

from codest.

psjay avatar psjay commented on May 30, 2024

这的确是一个 bug:在 codest 启动第一次之后,会在远程删掉本地不存在的文件(不遵守 gitignore 规则),正确的行为是改为遵守你的 gitignore 规则就好了。

不删除文件的选项可以考虑提供,但并不鼓励,基于以下原因:

  1. 删除文件也是正常变更;
  2. 删除文件会影响你程序的 behaviour:假设你在本地删除了一个文件,在另一个文件中引用了它,如果在远程不删除对应的文件,你发现不了错误。

from codest.

piperck avatar piperck commented on May 30, 2024

@psjay 如果有 .gitignore 也很棒,我是一直苦恼没有任何办法可以控制删除远端文件的问题,坐等更新!

from codest.

psjay avatar psjay commented on May 30, 2024

@piperck 请升级到 0.1.2,命中 .gitignore 里规则的文件在远程不会再被删除。

from codest.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.