TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Transitioning / Habituating myself to use a Version Control System

3 点作者 hypr_geek超过 13 年前
Hi,<p>I've been developing for Android for almost a year now, and a couple of days ago, I read some posts by Zach Holman &#38; HN comments on those articles, and got me thinking if using a VCS while being the sole developer is really productive.<p>What I've been doing till now is, use eclipse to export the project to a folder on every release, and place a txt file with changes in the folder (an ancient technique). I just copy-paste the project if I ever need to revert back (done only once), but I wonder if I should get used to using proper revision system. I was in an IT (services) company (quit in 2010) where we used Visual SourceSafe (doubt if anyone uses this) during the initial training.<p>I've finally zeroed in on Mercurial (mostly coz I use AndEngine, and its on Mercurial, if it works for Nicolas, it should work for me :]), and would like to know if anyone has some dos and donts to use it efficiently, while keeping my focus on development instead of getting overwhelmed by the vcs.<p>Thanks. :)

2 条评论

megamark16超过 13 年前
I've been using Git for version control for all of my own personal projects as a sole developer. I've heard that Mercurial and Git are very similar, and your reasoning for choosing Mercurial is very similar to my own choice of Git :-)<p>I like Git because I can easily track changes, see what I've done since the last time I commit (which is pretty often), and also keep separate branches for different sets of functionality without crossing over. I do mostly web development, so I will often start working on a new feature or a big change, only to be pulled off to fix a bug or add a smaller, more urgent feature, and push those live before finally getting back on track and finishing up. Using Git branches for all of those separate trains of thought helps me to keep things straight, and to be able to move quickly and easily between them.<p>As far as disciplining yourself to continually check into version control, maybe I'm too paranoid, but I used to always find myself creating copies of files before making big changes to them, just to be safe, or commenting out code instead of deleting it, because I might need to reference it again. Once I started using version control I broke myself of those coding habits, now I delete when something needs to be deleted, I overhaul files when they need overhauling, and commit regularly enough that if I ever need to look back at or restore a previous version of a file I can do so easily (and with date/time stamps!) Also, because I'm building a business around my software, it's nice to know that if/when I bring on other developers I will have a long history of the work I've done.<p>Good luck!
评论 #3110558 未加载
manuscreationis超过 13 年前
I've very recently had to have a bit of a holy war with a friend of mine over the merits of a VCS.<p>We were collaborating on a small project, he doing the front end work and I doing the middle and backend. He is not a developer in any sense of the word; WordPress Assembler is more of an apt description. He had never needed to use, nor came across any reasons demonstrating a need for, a VCS.<p>Trying to get him to realize why it was such a good idea is still an ongoing battle, but I eventually won him over with the following argument:<p>"Just take my word for it. I can sit here and keep trying to hammer home the same points, over and over, and you'll sit here and keep denying them. So lets just stop this, and you just take my word for it. This project is going to live in source control. If you hate Mercurial and want something simpler, we can switch to something else. But you aren't getting away from this. And any projects we do in the future, will ALSO be in source control. So you may as well make peace with it now."<p>The thing I believe he was really missing, and that we (I) haven't implemented yet is a continuous integration solution, with simplified deployments directly from the checked in source. His major gripe about not developing directly on the production server was the time it took to see changes. Which is a little silly, but when I look at it from his perspective, I can see his point. If I had taken the time to set that up from the start, he would've seen the benefit of it more immediately.<p>The moral of my story? Always use some kind of VCS. It may seem like a waste of time with just yourself on the project, but you'll always know for sure you have a copy of your work, safe and sound, accessible from anywhere you need it from. Just make it a part of your life, and before you know it, the "overhead" of using one will more or less disappear from your life. It's an essential building block to a successful project.<p>I can completely see how, if you had been forced to use VSS for anything, you'd see VCS as something that could get in your way. VSS was/is a blight.
评论 #3110574 未加载