内部处理源代码的建议

发布于 2024-10-06 06:36:37 字数 188 浏览 4 评论 0原文

你好 我目前发现需要处理我正在从事的几个项目的源代码。我不需要外部托管,但我确实需要在我的开发环境中有一个内部结构。 那么,你们建议如何处理这个问题?您只需将文件放在您环境中的文件共享上,还是设置某种版本控制系统?我对此很陌生,但我希望有某种方法可以恢复到旧版本的代码,我希望集中存储源代码,以便我可以从我的笔记本电脑和工作站访问。

/安迪.l

Hi
I'm currently seeing a need for handling source code for a few projects I'm working on. I have no need for external hosting, but I do need to have a structure internal in my development environment.
So, how would you guys recommend to handle this? To you just place the files on a file share in your environment, or do you set up some kind of versioning systems? I'm quite new to this, but I would like to have some way of getting back to old versions of my code, I would like to have the source code centrally stored so I can reach if from bothmy laptop and workstation.

/Andy.l

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

残龙傲雪 2024-10-13 06:36:37

使用源代码控制管理系统 - 我建议使用分布式系统,例如 GitMercurial,因此您不需要服务器或需要在线工作。

如果您确实愿意,您仍然可以拥有一个中心位置,可以从中推拉东西。

如果您必须有服务器,请使用SVN - 它很容易设置和广泛使用。

通过所有这些选项,您可以将托管服务用作中央存储。

Use a source control management system - I would suggest using a distributed one such as Git or Mercurial, so you don't need a server or need to be online to work.

You can still have a central location where you push and pull stuff from if you really want to.

If you must have a server, go with SVN - it is easy to setup and widely used.

With all of these options, there are hosted services that you can use as a central store.

所谓喜欢 2024-10-13 06:36:37

如果您使用的是 Windows 操作系统,那么 Visual SVN 就相当不错了。您可以将其安装在服务器上,并使用 Tortoise SVN 等客户端从其他计算机连接到它。基本版本可以免费使用。

If you are using windows OS, then Visual SVN is quite good. You can install it on the server and use a client like Tortoise SVN to connect to it from other machines. The basic version is free to use.

决绝 2024-10-13 06:36:37

一定要使用版本控制系统,它可以让您在编码日完成一些不错的工作流程,并安全地存储所有内容。有几个很好的免费 vcs(git、mercurial、subversion 等)。一段时间以来,我使用 git + dropbox 或 Sugar Sync 的组合来备份和共享我的存储库

http://git-scm .com/

Definitely use a version control system, it will allow you to do some nice workflows on your coding day and have all securely stored. There are several good free vcs (git, mercurial, subversion, etc). For Some time I used a combination of git + dropbox or sugar sync to back up and share my repos

http://git-scm.com/

书间行客 2024-10-13 06:36:37

请设置源代码控制存储库。使用 SCM 除了好处之外什么也没有。

关于选择哪种 SCM 系统,需要设置和学习的非常简单的存储库是 Mercurial(分布式)和 Subversion(集中式)。我知道您说过您希望集中访问您的资源,但请记住,这并不意味着您不能使用 Mercurial 来实现此目的。

这是 Joel Spolsky 撰写的关于 Mercurial 的精彩教程

Do setup a source control repository. Using a SCM, has nothing but benefits.

With respect of what SCM system to chose, to very simple repositories to setup and learn are Mercurial (distributed), and Subversion (centralized). I know you said you wanted centralized access to your sources, but keep in mind that that doesn't meant you can't use Mercurial for that purpose.

Here's a great tutorial on Mercurial by Joel Spolsky.

小姐丶请自重 2024-10-13 06:36:37

根据环境等有很多选择。SVN

是集中式源代码控制的绝佳全能选择。如果您更喜欢 DVCS(即使在本地环境中),您也可以在内部使用 Mercurial 和 Git。

无论如何,无论您拥有什么版本控制系统 - 都需要一个。即使只有一个开发人员在做个人项目,源代码控制也是必须的。

Lots of choices based on environment, etc.

SVN is an excellent all-around choice for centralized source control. You can also use Mercurial and Git internally if you prefer DVCS (even in a local environment).

In any case, regardless of what version control system you have - get one. Even if it's just one developer doing personal projects, source control is a must.

合久必婚 2024-10-13 06:36:37

毫无疑问,建立 SCM 是有意义的,而且只有优点。使用哪种 SCM 取决于多种情况:

  • 您的同事是否已经了解任何 SCM?我们正在使用 SVN,我认为向我的同事传授 git 这样的 DVCS 的概念是相当困难的。
  • 在我看来,使用 git 这样的 DVCS 在工作中需要更多的纪律:你必须记住推送到中央存储库。
  • 但这也是一个优势:您可以创建自己的开发分支并对其进行工作,而无需将其发布给其他同事(在某些情况下可以节省声誉:-))
  • 如果您或您的同事经常远程工作,请使用DVCS 比使用像 SVN 这样的集中式版本更舒服:您不需要连接到中央存储库,但仍然可以签入、创建分支和(非常重要)查看项目的完整历史记录,而无需连接(例如通过 VPN)到服务器在上班。
  • 对于集中式 VCS,我可以推荐 SVN(设置为 Hps 假设)
  • 作为 DVCS,我可以推荐 Git(msysgittortoisegit)
  • 如果您决定使用 SVN,您仍然可以使用git-svn 在客户端上:存储库正在使用 SVN 运行,但无论如何,您可以在离线时获得 DVCS 的优势。

There's no question that setting up a SCM makes sense and has only advantages. Which SCM to use depends on several circumstances:

  • Do your co-workers already know any SCM? We're using SVN and I think it would be quite hard to teach my colleagues the concepts of a DVCS like git
  • In my opinion, using a DVCS like git needs more discipline during work: you have to remember to push to the central repository.
  • But this is also an advantage: you can create your own development branches and work on them without publishing them to the rest of your colleagues (saves reputation in some cases :-))
  • If you or your co-workers often work from remote, using a DVCS is more comfortable than using a centralized one like SVN: you need no connection to your central repository but can still checkin, create branches and (quite important) view the complete history of your project without connecting (e.g. via VPN) to your servers at work.
  • For a centralized VCS, I can recommend SVN (setup as Hps supposed)
  • As DVCS I can recommend Git (msysgit with tortoisegit)
  • If you decide to use SVN, you can still use git-svn on the clients: the repository is being run with SVN, but anyhow, you get the advantages of a DVCS while being offline.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文