跟踪单个文件的版本控制系统 [英] Version control system which keeps track of individual files

查看:39
本文介绍了跟踪单个文件的版本控制系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,我使用 git 来管理我的乳胶文件.然而 git 一次管理一个文件夹中的所有乳胶文件.

Up to now I used git to manage my latex-files. However git manages all latex-files in a folder at once.

我想要的是一个版本控制系统

What I want is a version control system which

  • 分别为我提供每个文件的历史记录
  • 让我可以在不影响其他文件的情况下检查单个文件的旧版本
  • 让我在不影响其他文件的情况下为每个单独的文件创建分支
  • 为单个文件的版本提供标签

也许用git可以做到,但我不知道该怎么做.那么有没有什么好用的好用的版本控制系统呢?

Perhaps it is possible to do it with git, but I don't know how to do it. So is there any good, handy version control system for this purpose?

也许我应该补充一点,我使用 linux 作为操作系统,使用 emacs 作为乳胶编辑器.

Perhaps I should add that I use linux as os and emacs as latex-editor.

推荐答案

我同意@BasileStarynkevitch - Git 就是你所需要的.

I agree with @BasileStarynkevitch -- Git is all you need .

您可能只需要一个漂亮的 Git 图形用户界面,这样您就可以更轻松地查看正在发生的事情.

You probably only need a nice GUI for Git , so you can more easily see what's going on.

Git 是为程序员设计的,用于处理分布在多个子目录中的大量源文件.您的用例略有不同,但您仍然可以很好地使用 Git.

Git is made for programmers, to handle large amounts of source files, spread over multiple sub-directories. Your use-case is slightly different, but you can still use Git nicely for it.

早期版本控制系统(RCS、SCCS)做了您刚才在问题中描述的事情——但事实证明这是一团糟,因为任何真正的项目通常都不止一个文件 ;-) 而且很容易忘记如果每个文件都由它自己的版本控制处理,则签入一个文件.(不要这样做)

Early version control systems (RCS, SCCS) did what you just described in your question -- but it proved to be a mess, because any real project has typically more than just one file ;-) and it's easy to forget to check in a file if each one is handled by it's own version control. (don't do this)

因此,与其想我需要获取文件 A 的先前版本和文件 B 的另一个版本",不如考虑在使用 Git 时及时为整个项目制作快照.例如项目的迷你版本".如果你的项目是 LATEX,那么你正在写一本书或出版物——也许每次你完成更新时检查你的更改,并将其视为迷你发布"..

So instead of thinking "I need to get the previous version of file A, and another version of file B" , try to think of making snapshots in time of your complete project when you use Git. e.g. "mini-releases" of your project. If your project is LATEX, then you are writing a book or publication - maybe check-in your changes every time you're done with an update, and think of this as a 'mini-release' ..

使用 Git 的图形用户界面将帮助您查看文件、分支、标签等之间的差异.Git 具有将文件早期版本中的内容合并到当前文件中的功能——所以这对 Git 来说不是问题.还有用于查看和编辑并排差异的工具.

Using a Graphical User Interface for Git will help you see the differences between files, branches, tags, etc.. Git has features for merging-in content from earlier versions of a file into the current file -- so that is not a problem with Git. There are also tools for viewing and editing side-by-side diffs.

这篇关于跟踪单个文件的版本控制系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆