我可以在 .dwg (autocad) 中使用 git 吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32838369/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can I use git with .dwg (autocad)?
提问by cqcn1991
Version control with .dwg
is really a problem.
I'm wondering if it is possible to use git
to control the version? or just commit my changes in the file?
版本控制.dwg
确实有问题。我想知道是否可以git
用来控制版本?或者只是在文件中提交我的更改?
If this is not possible, then what is a good way of version control .dwg
?
如果这是不可能的,那么什么是版本控制的好方法.dwg
?
I find this: Can GIT, Mercurial, SVN, or other version control tools work well when project tree has binary files?It says svn
works with cad
, is it the only solution now?
我发现:当项目树有二进制文件时,GIT、Mercurial、SVN 或其他版本控制工具能否正常工作?它说svn
与 一起使用cad
,这是现在唯一的解决方案吗?
回答by abenci
Normally source control is most effective on TEXT files, I would therefore consider to use the TEXT version of DWG files: DXF.
通常源代码控制对 TEXT 文件最有效,因此我会考虑使用 DWG 文件的 TEXT 版本:DXF。
回答by Miiir
Autodesk ships Vault with every copy of AutoCAD (or you can download it from their website) for free.
Autodesk 随 AutoCAD 的每个副本(或者您可以从他们的网站下载)免费提供 Vault。
回答by CAD bloke
DWG files are binaries so using a version control system is less than ideal. You would be better off using Dropbox or something similar if you want a zero-effort version system that is distributed. They keep versions for 30 days in the free account or a year in a paid account. DXF is a red-herring in most cases, don't chase that rabbit.
DWG 文件是二进制文件,因此使用版本控制系统不太理想。如果你想要一个分布式的零努力版本系统,你最好使用 Dropbox 或类似的东西。他们在免费帐户中保留版本 30 天,在付费帐户中保留一年。DXF 在大多数情况下是一个红鲱鱼,不要追逐那只兔子。
Another thing you could do (I do this for a few clients) is work in a different folder than the archive. When you are ready to commit a version then sync the working folder with the archive. I use Free File Syncbut Watch out for Adware in it. I jsut installed v7.5. MalwareBytes said it was ok. It asked me if I wanted Opera browser during the install (nothankyou) but no other weird stuff happened. Looks like they (too) have dropped MalwareForge...er, SourceForge.
您可以做的另一件事(我为一些客户这样做)是在与存档不同的文件夹中工作。当您准备好提交版本时,将工作文件夹与存档同步。我使用免费文件同步,但要注意其中的广告软件。我刚刚安装了 v7.5。MalwareBytes 说没问题。它问我在安装过程中是否想要 Opera 浏览器(不,谢谢)但没有发生其他奇怪的事情。看起来他们(也)已经放弃了 MalwareForge ......呃,SourceForge。
back to the answer...
回到答案...
The versioning happens in Free File Sync in the option to /replace/delete files. You want Versioning, from their site...
版本控制发生在免费文件同步中的 /replace/delete 文件选项中。你想要版本控制,从他们的网站......
2. Keep all versions of old files
Set deletion handling to Versioning and naming convention to Time stamp. FreeFileSync will move deleted files into the provided folder and add a time stamp to each file name. The structure of the synchronized folders is preserved so that old versions of a file can be conveniently accessed via a file browser.
Example: A file Folder\File.txt was updated three times and old versions were moved to folder C:\Revisions
C:\Revisions\Folder\File.txt 2012-12-12 111111.txt C:\Revisions\Folder\File.txt 2012-12-12 122222.txt C:\Revisions\Folder\File.txt 2012-12-12 133333.txt
2.保留所有版本的旧文件
将删除处理设置为版本控制,将命名约定设置为时间戳。FreeFileSync 会将删除的文件移动到提供的文件夹中,并为每个文件名添加时间戳。同步文件夹的结构被保留,以便可以通过文件浏览器方便地访问文件的旧版本。
示例:文件 Folder\File.txt 更新了 3 次,旧版本移动到文件夹 C:\Revisions
C:\Revisions\Folder\File.txt 2012-12-12 111111.txt C:\Revisions\Folder\File.txt 2012-12-12 122222.txt C:\Revisions\Folder\File.txt 2012-12- 12 133333.txt
I use this timestamp: %timestamp% e. g. 2012-12-22 123044 format: [YYYY-MM-DD hhmmss]
我使用这个时间戳: %timestamp% e. g. 2012-12-22 123044 format: [YYYY-MM-DD hhmmss]
You will end up with a lot of files but they are easy to find and open. This has worked well for me for a few years now.
您最终会得到很多文件,但它们很容易找到和打开。几年来,这对我来说效果很好。
The biggest annoyance here is merge conflicts but Git was going to bite you with this anyway. If files are edited in both places the Free File Sync will flag the conflict and you will have to solve that mystery yourself.
这里最大的烦恼是合并冲突,但无论如何 Git 都会咬你。如果在两个地方编辑文件,免费文件同步将标记冲突,您必须自己解决这个谜团。
Dropbox's downside is similar but it will merge silently. That's not good. If someone else is in the same folder on a different machine then don't expect write locks and the *.dwl
lock files to work.
Dropbox 的缺点是相似的,但它会默默地合并。这不好。如果其他人在不同机器上的同一个文件夹中,那么不要指望写锁和*.dwl
锁文件可以工作。
回答by talisman
If you want seethe changes you need a specialized tool , the only one I am familiar with is Vico Doc Set Manager - http://www.vicosoftware.com/products/vico-doc-set-manager-/tabid/87528/. I think Autodesk Vault has a plugin for doing this.
如果您想查看需要专门工具的更改,我唯一熟悉的工具是 Vico Doc Set Manager - http://www.vicosoftware.com/products/vico-doc-set-manager-/tabid/87528/. 我认为 Autodesk Vault 有一个插件可以做到这一点。
回答by 0x0065
If you are part of an industry where people can reasonably expect people contributing to a 'common data environment' to keep transmittal records of when each version of each controlled document was provided to whom, then git maintains that document register in a form much closer to a traditional transmittal or document register.
如果您所在行业的人们可以合理地期望为“公共数据环境”做出贡献的人们保留每个受控文档的每个版本何时提供给谁的传输记录,那么 git 会以更接近于传统的传送或文件登记。
There is also the capacity for branching and milestone archiving in git:
在 git 中还有分支和里程碑归档的能力:
- explore an option study in a branch separate from the 'current' version;
- look at a drawing transmittal (pull request) from an external party and review it or fix it before merging it into the 'current' version visible to the whole team;
- implement an ISO 9001 review process for internal sign off of a branch (proposed transmittal) before it is permitted to be committed to the team's common data environment;
- save milestones of the current controlled document set at key milestones like development approval, building approval, tender issue, any tender addenda, construction issue. Checkout the milestone issue and browse the filesystem tree just as it was at that milestone. Compare what has changed between then and some other milestone.
- 在与“当前”版本分开的分支中探索选项研究;
- 查看来自外部方的图纸传输(拉取请求)并在将其合并到整个团队可见的“当前”版本之前对其进行或修复;
- 在允许提交到团队的公共数据环境之前,实施 ISO 9001 流程以对分支机构进行内部签核(提议的传输);
- 保存在关键里程碑设置的当前受控文件的里程碑,如开发批准、建筑批准、招标问题、任何招标附录、施工问题。检查里程碑问题并浏览文件系统树,就像在那个里程碑一样。比较当时和其他一些里程碑之间发生的变化。
As noted above, it is worth noting that most CAD deliverables for construction are proprietary binary formats, like your DWGs and PDFs. These do lose a lot of the otherpotential points of difference of git versus a basic file syncing tool like dropbox. They are not stored in git as efficiently as a text file. They are stored in some sort of special binary blob 'annex'. On the other hand the loss of the ability to confirm who wrote every word on every line of every document is not a reason to discard the other whole of document version control benefits of git over a cloud file syncing service with a single 'current' state. The github desktop client is a pretty good tool for non-technical people to see a list of altered documents between two states of the project history.
如上所述,值得注意的是,大多数用于建筑的 CAD 交付物都是专有的二进制格式,例如 DWG 和 PDF。这些确实失去了git 与基本文件同步工具(如 dropbox)的许多其他潜在差异点。它们不像文本文件那样有效地存储在 git 中。它们存储在某种特殊的二进制 blob“附件”中。另一方面,无法确认谁在每个文档的每一行上写下每个单词的能力并不是放弃 git 在具有单个“当前”状态的云文件同步服务上的其他整个文档版本控制优势的理由. github 桌面客户端对于非技术人员来说是一个非常好的工具,可以查看项目历史的两个状态之间的更改文档列表。
At least in construction with the shift to open standards for BIM collaboration between entities using text based ISO standard file formats like IFC we are on the cusp of a future where 3D models in a structured text file are the deliverable contract documents. I for one would like to be ready with a working understanding of how to use something like git to have a cryptographic signature on a commit that defines who is responsible for every element and property in the federated model, with revision descriptions. My brief investigations of this tend to suggest that ifcxml diffs are a lot easier to make useful sense of than ifc. The work to produce automatically validated simple ifcxml files to match ISO 19650 'information requirements' looks like the way a thoughtfully lazy person might want to set something up. As such, there is also some future proofing scope for git as a common data environment for DWGs, even if they are not fully realisable at present.
至少在建筑中,随着实体之间使用基于文本的 ISO 标准文件格式(如 IFC)的 BIM 协作向开放标准的转变,我们正处于未来的风口浪尖,其中结构化文本文件中的 3D 模型是可交付的合同文件。我想准备好了解如何使用 git 之类的东西在提交上拥有加密签名,该签名定义了谁对联合模型中的每个元素和属性负责,并带有修订描述。我对此的简短调查倾向于表明 ifcxml 差异比 ifc 更容易理解。生成自动验证的简单 ifcxml 文件以匹配 ISO 19650“信息要求”的工作看起来像是一个细心的懒人可能想要设置的方式。像这样,
You may even convince an entire project team to exchange documents in dxf format. Unless you are drafting all the contracts and reviewing their progress claims, that sounds pretty much like sparkly rainbow unicorn territory to me.
您甚至可以说服整个项目团队交换 dxf 格式的文档。除非你正在起草所有合同并他们的进度声明,否则对我来说这听起来很像闪闪发光的彩虹独角兽领土。
Alternatively we could all continue to use dropbox and excel document registers with a scanned signature on the 12 page pdf, to validate who authorised the documents' release, then do all the rest of the document control in jellyware. It'll probably all be fine until someone calls their lawyer. If there is a problem, the jellyware approach just requires endless hours of super fun busy work that should get any lawyer on hourly rates a bit excited. They could even load each milestone into a git repository and have git present the transmittal history to them so they can work out who's dead tree transmittal to attack.
或者,我们都可以继续使用 Dropbox 和 Excel 文档注册,并在 12 页 pdf 上扫描签名,以验证谁授权了文档的发布,然后在 jellyware 中完成所有其余的文档控制。在有人打电话给他们的律师之前,一切都会好起来的。如果有问题,果冻软件方法只需要无休止的超级有趣的繁忙工作,这应该会让任何按小时收费的律师有点兴奋。他们甚至可以将每个里程碑加载到 git 存储库中,并让 git 向他们展示传输历史,这样他们就可以找出要攻击的死树传输。