Git 和 Nexus 的区别?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13490684/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 14:57:01  来源:igfitidea点击:

Difference between Git and Nexus?

gitrepositorynexus

提问by Devos

I can't seem to find what the difference is between Git and Nexus. Are the two comparable?

我似乎无法找到 Git 和Nexus之间的区别。两者有可比性吗?

回答by VonC

There are both referential:

两者都有参考:

  • one (Git) is a source referential for version control (with features like merging, branching, tags)
  • the other (Nexus) is an artifact referential for any delivery (binaries or not)
  • 一 ( Git) 是版本控制的源代码参考(具有合并、分支、标签等功能)
  • 另一个(Nexus)是任何交付(二进制或非二进制)的工件参考

The referential database differs also:

参考数据库也不同:

  • Git has its own internal repository storage mechanism
  • Nexus is simply a collection of shared directories with a naming convention ( group.artifact.version ).
    As described in "What is a repository": a collection of binary software artifacts and metadata stored in a defined directory structure.
  • Git 有自己的内部仓库存储机制
  • Nexus 只是具有命名约定( group.artifact.version )的共享目录的集合。
    如“什么是存储库”中所述:存储在定义的目录结构中的二进制软件工件和元数据的集合。

The idea is that, for large deliveries that can be produced quite often, it is much easier to store them in Nexus ( you can clean them easily enough: cd+ rm), as opposed to version them ( which makes a DVCS repo like Git way too big way too fast to be cloned easily ).

这个想法是,对于可以经常生产的大型交付,将它们存储在 Nexus 中要容易得多(你可以很容易地清理它们:cd+ rm),而不是版本化它们(这使得 DVCS 存储库也像 Git 一样)太大太快而无法轻松克隆)。

So their goals are different, as I explain in:

所以他们的目标是不同的,正如我在:

You manage what you codein Git, and what you buildin Nexus.

您可以管理在 Git 中编写的代码以及在 Nexus 中构建的内容。

回答by Urs Reupke

@VonC has the high level, theoretical view.

@VonC 具有高水平的理论观点。

In everyday use, you'd store your source code and its history in a git repository, and store your build artifacts (e.g. the compiled software you want to deliver) in Nexus.

在日常使用中,您将源代码及其历史记录存储在 git 存储库中,并将构建工件(例如,您要交付的已编译软件)存储在 Nexus 中。

As such, they are not really comparable, but complementary.

因此,它们并不是真正可比的,而是互补的。