mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-13 22:30:37 +08:00
Delete source file and Summit translated file
This commit is contained in:
parent
3395bc7a87
commit
52d8282882
@ -1,126 +0,0 @@
|
||||
[#]: subject: (Using Git Version Control as a Writer)
|
||||
[#]: via: (https://news.itsfoss.com/version-control-writers/)
|
||||
[#]: author: (Theena https://news.itsfoss.com/author/theena/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (piaoshi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
Using Git Version Control as a Writer
|
||||
======
|
||||
|
||||
I believe modern writers should begin thinking about their processes, or workflows.
|
||||
|
||||
In a highly distracted world, it is imperative to take ownership over the chain of tasks we perform every day as writers. Traditionally, writers would put their writing to the hours where the distraction is less, and the focus high. Unfortunately advice from Hemingway, Atwood, et al., isn’t really applicable to us any more. The world we live in is far more connected, and thus have far more pitfalls for writers. Part of that is being disciplined enough to not let social media or cute videos of puppies and kittens distract us at the times we are writing.
|
||||
|
||||
But disconnecting from the internet isn’t really an option if part of your writing requires quick fact-checks, spellings of uncommon and technical words, etc., – this is very true for me when I am writing. The other issue is the distractions that are within the writing app itself; as a life long MS Word user, I found it getting prettier, but slower and more distracting. I spoke about this at length as being among the [primary reasons for transitioning into Vim][1] in the first place, so I am not going to speak extensively on this. The point being that writing in the modern world, on modern devices can be far from ideal.
|
||||
|
||||
Since I’ve already gone into detail on the [why I switched to Vim][2] and open source version control, I would like to use this article to talk about the **how**, specifically how to use open source version control technology such as git (and GitHub).
|
||||
|
||||
### What is Version Control, again?
|
||||
|
||||
![Source: https://git-scm.com/][3]
|
||||
|
||||
The diagram above is a illustration of how we perform traditional version control. This
|
||||
diagram assumes that you have one device and that you write only in that device. In my case, I write on a number of machines, including my Android phone and a selection of laptops of varying ages that I use for specific and in specific places. The one common task that I carry out between all these devices is writing – it is imperative, therefore, that my devices capture changes and version controls my files in sane manner. No more `file1V1_device1_date.doc` as I would name my files.
|
||||
|
||||
The diagram above also doesn’t take into account the tools that we use to write.A word processor such as LibreOffice Write works across Linux, Mac, and Windows machines, but using a word processor on the phone is an unpleasant experience. Some of us writers also use other text tools, including Gmail or our email clients, to write little sketches for our writing. Keeping track of all of these files and emails in a logical order is exhausting – I wrote a book using such a process, and trust me: the time I spent figuring out file names, version changes, comments, notes to self, and emails with additional notes, was enough to drive me to distraction.
|
||||
|
||||
Some of you reading this might rightly point out that cloud-based backup technology
|
||||
exists. While the benefits of cloud-based storage are immense, and I continue using them, version control barely exists, or isn’t powerful.
|
||||
|
||||
### A better workflow
|
||||
|
||||
Like the rest of the planet, the start of the pandemic led to some anxiety and some soul
|
||||
searching. I spent the time teaching myself web development on [The Odin Project][4] (highly recommended for those who are thinking of learning html, CSS, JavaScript/Ruby).
|
||||
|
||||
Among the first modules was an introduction to Git: what version control was, and what problems it sought to address. Reading this chapter was a revelation. I knew immediately that this _git_ was exactly what I was looking for as a writer.
|
||||
|
||||
The better way, then, isn’t localized version control but _distributed_ version control. ‘Distributed’ describes the distribution of the _devices_ that I will be accessing a file from, and editing/changing thereafter. The diagram below is a visual illustration of distributed version control.
|
||||
|
||||
![Source: https://git-scm.com/][5]
|
||||
|
||||
### My way
|
||||
|
||||
My goals in building a version control system for writing were as follows:
|
||||
|
||||
* Make my manuscript repository accessible from anywhere, from any device
|
||||
* Ease of use
|
||||
* Reduce or remove the friction that comes about from shifting context between writing, study and coding workflows – as much as possible, we will use the same tool (i.e. Vim)
|
||||
* Scalable
|
||||
* Easy to maintain
|
||||
|
||||
|
||||
|
||||
Based on the above needs, the diagram below is my distributed version control system for my writing.
|
||||
|
||||
![][6]
|
||||
|
||||
As you can see, my version control system is a simplistic adaptation of distributed version control. By adding git version control to a folder on cloud storage ([pCloud][7]) in my case, I can now draw the benefits of both technologies. Thus my workflow can be visualized as follows:
|
||||
|
||||
![][8]
|
||||
|
||||
#### Advantages
|
||||
|
||||
1. I have one writing (and coding) tool
|
||||
2. I have version control of my manuscripts, no matter what device I access the file from
|
||||
3. It’s [super easy, barely an inconvenience][9]
|
||||
4. Easy to maintain.
|
||||
|
||||
|
||||
|
||||
#### Drawbacks
|
||||
|
||||
The writers among you must wonder what drawbacks exist in the system. Here are a few that I anticipate as I continue using and refining this workflow.
|
||||
|
||||
* Comments on drafts: one of the more useful features of word processors is the ability to comment. I often leave comments for myself when I want to come back to a certain portion of the text. I still haven’t figured out a workaround for this.
|
||||
* Collaboration: Word processors allow for collaboration between writers. During my advertising days, I would use Google Docs to write copy and share the link with my designers to extract the copy for ads and websites. Right now, my workaround for this writing the copy in markdown, and exporting the markdown file to a .doc file via Pandoc. More critically, when my manuscripts are completed, I’d need to still send the files in .doc format for my editors. Once my editor makes
|
||||
those changes and sends it back, it makes little sense for me to try opening it again in Vim. At this point, the system’s limitations will become more obvious.
|
||||
|
||||
|
||||
|
||||
In no way am I saying this is the best method, but this is the best method for _me_ at this
|
||||
point in my career. I imagine I will be refining this further as I get more familiar and comfortable with my new [open source tools for writing][10] and version control.
|
||||
|
||||
I hope this serves as a good introduction to writers wanting to use Git for their document version control. This is by no means an extensive article, but I will share some useful links to make the journey easier for you.
|
||||
|
||||
1. [Git Basics from The Odin Project:][11]
|
||||
2. [Getting started with Git][12]
|
||||
3. GitHub’s Basics of Git Tutorial
|
||||
|
||||
|
||||
|
||||
As a bonus, here’s a screen recording of me using Vim on my Android device to work on a poem, pushing the changes to Git.
|
||||
|
||||
#### Big Tech Websites Get Millions in Revenue, It's FOSS Got You!
|
||||
|
||||
If you like what we do here at It's FOSS, please consider making a donation to support our independent publication. Your support will help us keep publishing content focusing on desktop Linux and open source software.
|
||||
|
||||
I'm not interested
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/version-control-writers/
|
||||
|
||||
作者:[Theena][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/theena/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://news.itsfoss.com/how-i-started-loving-vim/
|
||||
[2]: https://news.itsfoss.com/configuring-vim-writing/
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY2NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: https://www.theodinproject.com/
|
||||
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjgwMCIgd2lkdGg9IjY2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwNSIgd2lkdGg9IjYxNyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[7]: https://itsfoss.com/recommends/pcloud/
|
||||
[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc1MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[9]: https://www.youtube.com/watch?v=NtH-HhaLw-Q
|
||||
[10]: https://itsfoss.com/open-source-tools-writers/
|
||||
[11]: https://www.theodinproject.com/paths/foundations/courses/foundations/lessons/introduction-to-git
|
||||
[12]: https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
|
@ -0,0 +1,107 @@
|
||||
[#]: subject: (Using Git Version Control as a Writer)
|
||||
[#]: via: (https://news.itsfoss.com/version-control-writers/)
|
||||
[#]: author: (Theena https://news.itsfoss.com/author/theena/)
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (piaoshi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
||||
作为一个写作者如何使用Git版本控制
|
||||
======
|
||||
|
||||
我相信当代的写作者们应该开始思考他们的工作流程了。
|
||||
|
||||
在一个注意力高度分散的世界里,作为写作者,我们必须对每天执行的任务链拥有控制权。传统上,作家们会把他们的写作放在分散注意力的事较少、注意力高度集中的时间段。不幸的是,海明威、阿特伍德们的这些建议不再真正适用于我们了。我们所生活的世界联系得更紧密了,因此对作家来说就有了更多的陷阱。这首先要求我们要有足够的自制力,不要让社交媒体或小狗和小猫的可爱视频在我们写作的时候分散我们的注意力。
|
||||
|
||||
但是,如果你的写作需要快速地检查事实、拼写不常见和技术性的词汇等,断开与互联网连接并不是一个现实的选项——这正是我写作时的场景。另一个问题是你用于写作的应用程序本身的干扰;作为一个长期使用 MS Word 的人,我发现它越来越漂亮,但速度越来越慢,也越来越让人分心。作为当初我[迁移到 Vim 的主要原因][1]之一,我曾详细地谈到了这一点,所以我不打算再在这个问题上大谈特谈。重点是,在现代世界中,在现代设备上进行写作,可能远非理想状态。
|
||||
|
||||
因为我已经详细介绍过了[我为什么转向 Vim][2]和开源版本控制,在这篇文章中,我更想谈谈该 **怎么做**,特别是如何使用开源的版本控制技术,比如git(和GitHub)。
|
||||
|
||||
### 什么是版本控制?再来一次?
|
||||
|
||||
![Source: https://git-scm.com/][3]
|
||||
|
||||
上图是我们如何进行传统版本控制的一个说明。这个图中假设你有一台设备,而且你只在那台设备上写作。但对我而言,我在许多机器上写作,包括我的安卓手机和一些不同年代的笔记本电脑,我会在特定的任务特定的位置使用到它们。我在所有这些设备上进行的一个共同任务就是写作——因此,我的设备必须以合理的方式捕捉变化并控制文件的版本。不要再让我将 `file1V1_device1_date.doc` 作为文件名了。
|
||||
|
||||
上图也没有考虑到我们用来写作的工具。像 LibreOffice Write 这样的文字处理器可以在 Linux、Mac 和 Windows 系统上使用,但在手机上使用文字处理器将会是一段不愉快的经历。我们中的一些写作者还使用其他文本工具——包括 Gmail 或我们的电子邮件客户端——来为我们的写作打草稿。但按逻辑顺序跟踪所有这些文件和电子邮件是相当折磨人的——我就用这样的流程写过一本书,相信我:我花在弄清文件名、版本变化、评论、给自己的注释以及带有附加注释的电子邮件上的时间,足以让我精神错乱。
|
||||
|
||||
读到这里,你们中的一些人可能会正确地指出,有云备份技术呀。虽然云存储的好处是巨大的,而且我也在继续使用它们,但其版本控制几乎没有,或者说并不强大。
|
||||
|
||||
### 一个更好的工作流程
|
||||
|
||||
就像地球上的其它地方一样,大流行病的开始引发了一些焦虑和一些反思。我利用这段时间在 [The Odin Project][4](强烈推荐给那些想学习 html、CSS、JavaScript/Ruby 的人)上自学了网络开发。
|
||||
|
||||
在课程的第一个模块中,有一个关于 Git 的介绍:什么是版本控制,以及它试图解决什么问题。读了这一章后,我豁然开朗。我立即意识到,这个 _git_ 正是我作为一个写作者所要寻找的东西。
|
||||
|
||||
是的,更好的方法不是本地化的版本控制,而是 _分布式_ 的版本控制。“分布式”描述的是设备的分布,而我在这些设备上访问文件,以及之后进行编辑修改。下图是分布式版本控制的一个直观说明。
|
||||
|
||||
![Source: https://git-scm.com/][5]
|
||||
|
||||
### 我的方法
|
||||
|
||||
我为写作建立一个版本控制系统的目标如下:
|
||||
|
||||
* 使我的稿件库可以从任何地方、任何设备上访问
|
||||
* 易于使用
|
||||
* 减少或消除因在写作、学习和编码各工作流程之间的场景切换而产生的摩擦——尽可能使用同一工具(即 Vim)。
|
||||
* 可扩展性
|
||||
* 易于维护
|
||||
|
||||
基于以上需求,下图是我进行写作的分布式版本控制系统。
|
||||
|
||||
![][6]
|
||||
|
||||
如你所见,我的版本控制系统是分布式版本控制的一个简单的适配。在我的例子中,通过将 git 版本控制应用到云存储([pCloud][7])的一个文件夹上,我可以同时利用这两种技术的优点。因此,我的工作流程可以用下图描述:
|
||||
|
||||
![][8]
|
||||
|
||||
#### 优势
|
||||
|
||||
1. 我用一个写作(和编码)工具
|
||||
2. 我可以对我的手稿进行版本控制,无论我是从什么设备上访问文件的
|
||||
3. [超级简单,几乎没有任何不便之处][9]
|
||||
4. 易于维护
|
||||
|
||||
#### 缺点
|
||||
|
||||
你们中的写作者一定想知道这个系统存在什么缺点。以下是我在持续使用和完善这一工作流程时预计到的几个问题。
|
||||
|
||||
* 对草稿的评论:文字处理器的一个更有用的功能是具有评论的功能。当我希望以后再回到文本的某一部分时,我经常在这部分为自己留下一个评论。我仍然没有想出一个解决这个问题的办法。
|
||||
* 协作:文字处理程序允许写作者之间进行协作。在我以前做广告相关工作的时候,我会用 Google Docs 来写文案,然后分享链接给我的设计师,从而他可以为广告和网站对文案进行摘录。现在,我的解决方法是用 markdown 写文案,并通过 Pandoc 将 markdown 文件导出为 .doc 文件。更关键的是,当我的手稿完成后,我仍然需要将文件以 .doc 格式发送给我的编辑。一旦我的编辑做了一些修改并把它发回来,我再尝试用 Vim 打开它就没有意义了。在这一点上,该系统的局限性变得更加明显。
|
||||
|
||||
我并不是说这是最好的方法,但在我职业生涯的这个阶段,这是对我来说最好的方法。我想,随着我对我的新的[用于写作的开源工具][10]和版本控制越来越熟悉和适应,我将进一步完善这个方法。
|
||||
|
||||
我希望这篇文章能为那些想使用 Git 进行文档版本控制的写作者提供一个很好的介绍。这肯定不是一篇详尽的文章,但我将分享一些有用的链接,使你的旅程更容易。
|
||||
|
||||
1. [The Odin Project 介绍的 Git 基础知识][11]
|
||||
2. [开始使用 Git][12]
|
||||
3. GitHub 的 Git 基础知识教程
|
||||
|
||||
作为彩蛋,这里有一段我在安卓设备上使用 Vim 处理一首诗,并将改动推送到 Git 的屏幕录像。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://news.itsfoss.com/version-control-writers/
|
||||
|
||||
作者:[Theena][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[piaoshi](https://github.com/piaoshi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://news.itsfoss.com/author/theena/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://news.itsfoss.com/how-i-started-loving-vim/
|
||||
[2]: https://news.itsfoss.com/configuring-vim-writing/
|
||||
[3]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjY2NiIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[4]: https://www.theodinproject.com/
|
||||
[5]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjgwMCIgd2lkdGg9IjY2OCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[6]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjYwNSIgd2lkdGg9IjYxNyIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[7]: https://itsfoss.com/recommends/pcloud/
|
||||
[8]: data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9Ijc1MSIgd2lkdGg9Ijc4MCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjEiLz4=
|
||||
[9]: https://www.youtube.com/watch?v=NtH-HhaLw-Q
|
||||
[10]: https://itsfoss.com/open-source-tools-writers/
|
||||
[11]: https://www.theodinproject.com/paths/foundations/courses/foundations/lessons/introduction-to-git
|
||||
[12]: https://git-scm.com/book/en/v2/Getting-Started-About-Version-Control
|
Loading…
Reference in New Issue
Block a user