简体   繁体   English

版本控制系统C#

[英]Version Control System c#

I'm working on a C# app that uses SQL 2008 express. 我正在使用SQL 2008 Express的C#应用​​程序上工作。 Sometimes I work at home and the most of the time at my office so there is no way to work in the same network. 有时,我大部分时间在家里工作,而在办公室里工作,因此无法在同一网络中工作。 Everytime I change location, I need to save the project in my USB and update files in my home/office computer, so I find this a little bit frustrating. 每次更改位置时,我都需要将项目保存到USB中并在家用/办公计算机中更新文件,因此我感到有些沮丧。

Do you know a version control software which could let me do this without using my USB? 您是否知道一个版本控制软件,可以让我在不使用USB的情况下执行此操作? something like SVN where I could only update my repository to have the most recent version? 像SVN这样的地方,我只能将其存储库更新为具有最新版本? What about changes in the database? 那么数据库中的更改呢? is there a way to keep this updated? 有没有办法保持此更新?

The scenario you describe is well covered by Mercurial or Git . 您描述的方案已被MercurialGit很好地涵盖了。 You can use some online repository to store your work, like GitHub or BitBucket . 您可以使用一些在线存储库来存储您的工作,例如GitHubBitBucket In any case you should create some strategy for of automatic deployment of the DB. 无论如何,您都应该为自动部署数据库创建一些策略。

Just you? 只有你? Try dropbox and work from the same folder. 尝试dropbox并在同一文件夹中工作。 It holds a 30-day history for free and syncs files automatically... It is much more convenient than source control for one user. 它具有30天的免费历史记录并自动同步文件...对于一个用户,它比源代码控制要方便得多。

There is plenty of free SVN hosting (google code for instance) if you don't care that it's open source. 如果您不关心SVN是开源的,则有很多免费的SVN托管(例如Google代码)。 There are plenty of SVN clients that integrate right into visual studio (One that I use and suggest would be AnkhSVN). 有很多SVN客户端都可以直接集成到Visual Studio中(我使用并建议使用的是AnkhSVN)。 If you DB is on the local computer you're developing, you won't be much luck--but consider moving to a remote location. 如果您的数据库位于正在开发的本地计算机上,那么运气不会太好-但请考虑移至远程位置。

版本控件只是跟踪存储库中的更改(无论如何我还是建议您使用GitHub)。对于数据库,如果您编写数据库脚本,则可以将脚本文件放入存储库中并将其推送到源控件中(您没有谈谈您的数据库策略)

You could combine dropbox with SVN. 您可以将Dropbox与SVN结合使用。 Create your SVN repository at whichever location you work at more, then check the code out to your dropbox folder. 在您需要工作的任何位置创建SVN存储库,然后将代码签出到您的保管箱文件夹中。 You can then work from both work and home without having to carry your files with you, and you can keep your code in source control. 然后,您可以在家工作,而不必随身携带文件,并且可以将代码保留在源代码控制中。

You won't be able to commit or get latest from your off-location, but that shouldn't be a problem given that dropbox is going to automatically back-up your files for you. 您将无法从异地提交或获取最新信息,但这不会成为问题,因为Dropbox会自动为您备份文件。 Just make sure to do your commit first thing when you get to your main location. 只要确保在到达主要位置时就要做第一件事。

Some sort of publicly hosted source control like Github or Bitbucket may work, but honestly for things that I'm just hacking on in a few differnet places, I just use DropBox. 某些公共托管的源代码控制(例如Github或Bitbucket)可能会起作用,但是老实说,对于我只是在几个不同的地方进行黑客攻击的事情,我只是使用DropBox。 Store your working copy of hte project in a DropBox folder, and when you get home it's automagically synced. 将hte项目的工作副本存储在DropBox文件夹中,当您回家时,它会自动进行同步。

You may wish to host your own gitolite - at work or via dyndns at home - and have your develop branch on that one. 你不妨举办自己的gitolite -在工作中或通过在家里DynDNS的-和你的开发分支上的那一个。 Maybe you already have a Team Foundation Server at work already, then you could use that one. 也许您已经在使用Team Foundation Server,那么您可以使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM