Git:忽略编译的Google Go [英] Git: Ignore compiled Google Go
本文介绍了Git:忽略编译的Google Go的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Linux上,我编译的Go代码并未以扩展名结尾.
My compiled Go code does not end with an extension on Linux.
在.gitignore文件中是否有任何忽略这些提示的提示?
Any tips for handling ignoring these in the .gitignore file?
推荐答案
将构建产品与源代码分开.这有几个优点:
Keep your build products separate from your source code. This has several advantages:
- 您可以同时启动同一代码的许多不同版本,而无需创建多个克隆
- 很容易确信您确实做了一次清洁工作;
rm -rf objdir
将删除有问题的make clean
会丢失的文件 - 您可以从源树的只读副本(例如CD-ROM)开始构建版本
- 您不太可能意外提交生成的文件
-
git clean -dxf
将清除您的源代码树,但不会触摸您构建的文件
- you can start many different builds of the same code at the same time without creating multiple clones
- it's easy to be confident that you've really done a clean;
rm -rf objdir
will remove files that a buggymake clean
will miss - you can kick off a build from a read-only copy of the source tree (e.g., CD-ROM)
- you're less likely to accidentally commit generated files
git clean -dxf
will clean your source tree, but won't touch your built files
请注意,GNU Automake和Make支持称为 VPATH <的功能. /a>,以便轻松将源树与构建树分开.
Note that GNU Automake and Make support a feature called VPATH to make it easy to separate the source tree from the build tree.
这篇关于Git:忽略编译的Google Go的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文