首页 \ 问答 \ 忽略git-svn dcommit中的某些文件(Ignore certain files from git-svn dcommit)

忽略git-svn dcommit中的某些文件(Ignore certain files from git-svn dcommit)

有没有办法将文件保存在本地git-svn repo中,但在git-svn dcommit中忽略它? 我有几个脚本/批处理文件,我想保留在本地git-svn repo但不是dcommit到中央SVN repo。

那可能吗?


Is there a way to keep a file in local git-svn repo, but ignore it in git-svn dcommit? I have few scripts/batch files which I had like to keep in local git-svn repo but not dcommit to central SVN repo.

is that possible?


原文:https://stackoverflow.com/questions/22551273
更新时间:2023-05-30 22:05

最满意答案

writeFile不需要close方法,因为它在一次调用中打开/写入/关闭文件。

主要标准确定两者之间不存在/需要显式close ,而是:数据是否容易适合RAM? 如果是这样,那么writeFile肯定更容易使用(并且可能稍微快一点); 否则,您最好使用流并以块的形式写入数据。


writeFile doesn't need a close method because it opens/writes/closes the file all in a single call.

The main criteria do decide between the two is not the presence/need of an explicit close but rather: does the data fit easily in RAM? If it does, then writeFile is certainly simpler to use (and potentially a slightly bit faster); else, you better use streams and write data in chunks.

相关问答

更多
  • 当你在node.js中使用流时,你应该更喜欢管道。 根据节点文档的 '数据'事件发出缓冲区(默认)或字符串(如果编码已设置)。 在处理文本流时,可以使用“数据”事件将所有数据块连接在一起。 然后,您可以像使用常规字符串一样处理数据。 但是当你使用二进制数据时,它并不是那么简单,因为你会接收缓冲区。 要连接缓冲区,你应该使用像Buffer.concat这样的特殊方法。 因此,可以将这种方法用于二进制流,但不值得痛苦。 更新 如果你想要做到这一点,试试下面的代码: var buffers = []; reads ...
  • 您需要在写入文件之前打开该文件。 你的HANDLE hFind只是迭代目录/文件的句柄,而不是文件的打开句柄。 使用CreateFile ()打开文件 You need to open the file before writing to it. Your HANDLE hFind is just a handle to iterate over directories/files, not an open handle to a file. Use CreateFile() to open the fil ...
  • 来自服务器的文件名包含: s,它们是Linux ext4上的有效文件名字符,但不在Windows ntfs 。 更改 var name = regexp.exec(content_disposition)[1]; 至 var name = regexp.exec(content_disposition)[1].replace(':', '-'); 解决了这个特殊问题。 The file names coming from the server had :s in them, which is a val ...
  • 您可以使用async模块。 它也有助于清理你的代码: var async = require('async'); async.each(['a', 'b', 'c', 'd'], function (file, callback) { fs.writeFile('content/' + file + '.json', JSON.stringify(content[file], null, 4), function (err) { if (err) { co ...
  • writeFile不需要close方法,因为它在一次调用中打开/写入/关闭文件。 主要标准确定两者之间不存在/需要显式close ,而是:数据是否容易适合RAM? 如果是这样,那么writeFile肯定更容易使用(并且可能稍微快一点); 否则,您最好使用流并以块的形式写入数据。 writeFile doesn't need a close method because it opens/writes/closes the file all in a single call. The main criteri ...
  • 由于执行的结果是labelIdsFilePath中格式良好的JSON对象,似乎一切正常。 也许最初的数字集包含重复数据,并对它们进行排序使这一事实更加透明? 尝试在对数组进行排序之前和之后打印出数组的长度。 这应该向你展示它不会增加一倍的尺寸,你只是看到那里的重复。 console.log(labelIds.length) 如果你真的不需要重复, labelIds = _.uniq(labelIds) 然后保存它。 Since the result of the execution is a well fo ...
  • 我的同事,在Windows下找到这个问题的解决方案: Select writefile(( "C:\\MyPath\\" || b.filename),(data)) from db1.files a inner join db2.filesTable b on a.fileId= b.fileId Limit 1; My colleague, find the solution for this problem under Windows : Select writefile(( "C:\\MyPath ...
  • 将b64ToBlob函数重写为类似下面代码的函数可以正常工作。 你需要取出一个标题签名字符串,如data:image/gif;base64,如果base64编码的字符串有它。 b64ToBlob(b64Data: string): any { return Uint8Array.from(atob(b64Data), (c) => c.charCodeAt(0)); } Rewriting b64ToBlob function to the one like the code below would ...
  • var request = require("request-promise"); var fs = require("fs"); var imageUrl = "http://www.biografiasyvidas.com/biografia/m/fotos/mandela_nelson_5.jpg"; request({ "uri":imageUrl, "encoding": null }).then((data) => { var wstream = fs.createWri ...
  • 您遇到的问题是在循环结束时调用您的回调,因此value已更改。 解决方案是使用闭包来存储值的value : for (var value in CourseTitleArray) { (function(value){ console.log( "Course Title " + CourseTitleArray[value]); var newImageLocation = path.join(__dirname, 'app/img/c ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。