版本控制系统_版本控制系统简介

版本控制系统

Unless you are a fully-fledged genius, any kind of creative work – be it coding, art, or music – will be a process of evolutionary change. Ideas are patched together and revised; variations of an initial concept are experimented with and creatively cross-pollinate, eventually producing a complete work. Add another person to the mix and the twists and turns of the creative process become even more complex.

除非您是成熟的天才,否则任何形式的创意作品(无论是编码,艺术还是音乐)都将是进化变革的过程。 想法被修补并修订; 对最初概念的各种变体进行了试验,并进行了创造性的异花授粉,最终产生了完整的作品。 将其他人添加到组合中,创作过程的曲折就变得更加复杂。

For most human history, this creative process has been entirely invisible: historians consider themselves blessed by fate to find an early sketch by Michelangelo or a Shakespeare first draft. But today, we can preserve every step you take with version control.

对于大多数人类历史而言,这种创造过程是完全不可见的:历史学家认为自己很幸运,能够找到米开朗基罗或莎士比亚的初稿的早期素描。 但是今天,我们可以保留版本控制的每个步骤。

版本控制概念 (Version Control Concepts)

The simplest and most familiar form of version control is the ubiquitous Undo option, which reverses a sequence of operations. In most cases, this historical timeline is maintained only while a document is open, and discarded once it is closed. More advanced applications may display the change history as a series of snapshots, but all such systems have the same limitation: they are all linear recordings of what occurs in a file.

最简单,最熟悉的版本控制形式是无处不在的“ 撤消”选项,它可以逆转一系列操作。 在大多数情况下,此历史时间线仅在文档打开时才维护,而在文档关闭时就丢弃。 更高级的应用程序可能将更改历史记录显示为一系列快照,但是所有此类系统都具有相同的局限性:它们都是文件中所发生内容的线性记录。

Photograph of tree ringsImagine the cross section of a tree’s trunk. The growth rings record the changes to the organism, but you can only proceed outwards, in linear time. To make a variation of the tree, you would have to take a cutting and start an entirely different plant. When working with digital files, this approach causes massive replication and confusion: we’ve all seen project folders filled with filenames like
final.xyz, true_final.xyz, and revision_true_final.xyz

final.xyz,true_final.xyzrevision_true_final.xyz文件名的项目文件夹

Ideally, what we want is a system that achieves several goals:

理想情况下,我们需要一个能够实现以下目标的系统:

  • The system should preserve the changes made to files, without confusing contributors with multiple copies .

    系统应保留对文件所做的更改,而不会使贡献者混淆多个副本。
  • Users should have the ability to go back or forward through almost point in the file’s change history.

    用户应具有前进或后退的能力,可以浏览文件更改历史记录中的几乎所有内容。
  • When working in teams, we’d like to know that we’re always dealing with the latest version of any file, and to know who contributed what changes.

    在团队中工作时,我们想知道我们一直在处理任何文件的最新版本,并且想知道谁贡献了哪些更改。
  • We would want the ability to make a new “branch” of a project to experiment with, knowing that changes made to it will not affect the main “trunk” unless we wish them to.

    我们希望能够对项目进行新的“分支”试验,因为知道该项目所做的更改不会影响主要的“树干”,除非我们希望这样做。
  • Obviously, we’d like the project to be stored securely offsite, both so that we can get access to it from anywhere and to act as a dependable backup of our work.

    显然,我们希望将项目安全地存储在异地,以便既可以从任何地方访问它,又可以作为我们工作的可靠备份。

版本控制系统 (Version Control Systems)

source control and revision control). Each system has its own advantages, adherents and defenders. A few features, including those mentioned above, are common between all of them: creative work and its branches are stored in a central repository that contributors can pull from, make modifications, and push changes to. There is usually one person who is given the role of a central figure or maintainer, who can merge contributed changes to the main trunk. Finally, files can be locked off and restricted from alteration.

源代码控制修订控制 )。 每个系统都有自己的优势,拥护者和维护者。 它们之间有一些共同点,包括上面提到的那些点:创意作品及其分支存储在中央存储库中 ,供贡献者从中提取 ,修改和推送更改。 通常有一个人担任中心人物或维护者 ,可以贡献的变更合并主干中 。 最后,可以将文件锁定并限制其更改。

The most popular version control system in use today is Git, although there are many other possibilities: Mercurial, CVS and Subversion are all in common use.

当今使用的最流行的版本控制系统是Git ,尽管还有许多其他可能性: MercurialCVSSubversion都是通用的。

LayerVault, for instance, provides the ability to store changes to PhotoShop documents and other formats, and share these alterations with others.

LayerVault提供了以下功能:存储对PhotoShop文档和其他格式的更改,并与他人共享这些更改。

避免可怕的命令行 (Avoiding The Fearsome Command Line)

Like the installation and use of many preprocessors, the biggest challenge to first-time users of version control systems is that almost all of them are driven from the command line. To those brought up in a point-and-click (or touch-and-gesture) world, this can be strange, frightening, and somewhat intimidating. Thankfully, there are graphical applications such as Tower that are built with support for most version control systems. While a graphical user interface will not give you the power, range and flexibility of issuing text commands, they do provide the most common features in a manner that is more easily accessible to most.

像许多预处理器的安装和使用一样,版本控制系统的首次用户所面临的最大挑战是几乎所有的预处理器都是从命令行驱动的。 对于那些在点击(或触摸和手势)世界中成长的人来说,这可能是奇怪的,令人恐惧的并且有些令人生畏。 值得庆幸的是,有一些诸如塔的图形应用程序是为大多数版本控制系统提供支持而构建的。 虽然图形用户界面不会给您发出文本命令的功能,范围和灵活性,但它们确实以大多数人更容易访问的方式提供了最常见的功能。

In future articles, I’ll take you through the process of using version control systems to preserve, share and alter your own work.

在以后的文章中,我将带您完成使用版本控制系统来保存,共享和更改自己的作品的过程。

翻译自: https://thenewcode.com/816/Introduction-To-Version-Control-Systems

版本控制系统

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值