Put your work under version control today

There is no project so small, so trivial, that it is not worth you putting it into a Subversion repository. If it's worth your time to work on it, it's worth saving. Putting it in Subversion is a matter of a few statements, and you don't have to do any big fancy-shmancy server setup.

Let's assume you're working on Linux/Unix, and you have svn installed, which is pretty standard these days. Say you're working on a game called bongo, and you've just been keeping it in ~/bongo. Do this:

# Create the Subversion repo
$ mkdir /svn

# Create the bongo repo
$ svnadmin create /svn/bongo

# Import bongo into its project
$ cd ~/bongo
$ svn import file:///svn/bongo -m'First import of bongo into Subversion'

# Move the original bongo directory out of the way,
# in case something goes wrong
$ mv ~/bongo ~/bongo-original

# Check out bongo from Subversion
svn co file:///svn/bongo

At this point, you'll have a checked-out version of bongo in ~/bongo, and you can make commits against it.

Ricardo Signes points out that Git makes it even easier.

# Go to the bongo directory
$ cd ~/bongo

# Import bongo
$ git init

With Git, everything is put in your ~/.git directory, and you don't have to check out anything from the project.

Whatever route you choose, version control is so simple these days there's just no excuse not to do it. Your programming life will never be the same.

Categories:

6 Comments

singingfish said:

Any chance someone could show the equivalent process to use for git?

Andy Lester said:

It's in the article. Or is there something else you wanted besides what's in the article?

git init doesn't actually store anything. You probably want to follow that up with these calls:

$ git add .
$ git commit -m "Hooray"

Also.. isn't it the case that to use Subversion locally, you need to also run "svnserve -d"? This article seems to be lacking a lot of crucial details!

With bzr it's also as simple as with git (or most other distributed version control systems probably):

$ cd ~/project
$ bzr init
$ bzr add
$ bzr ci -m "Initial import"

The repository then is stored in the .bzr folder in the current directory and may get pushed e.g. on your webserver or uploaded to a service like Launchpad.

bzr is available e.g. in Ubuntu, many other distributions and for Windows.

See bazaar-vcs.org.

you dont need "svnserv -d" when the repo is file:///

-stu

zkofjtelc said:


相关的主题文章:

If you shoes are hurting your feet because the heels are too high, then try going to a chemist and buying some scholl party feet.These are little gel packets that you slip into the shoe and act as tiny cushions.They are unbelievable good at giving you relief from aching feet.


A job, a raise, a house, a car, a vacation trip to the bahamas.You dont deserve any of those things.The only way you will get and keep the things in life that you toms outlet online want or need, is by earning them.You earn a raise, you save for the vacation, you get a job so you can buy a car.

I watched as my wife slipped away from me;Glenys toms was just 57 when she started showing signs of alzheimer's.Husband adrian, 62 and from brownhills, spoke to zoe chamberlain about toms outlet sale coupon code his dance-Loving wife's brave battle against the condition-And his own pedal kart tribute.Ifirst noticed something wrong with glenys one christmas morning.

I’d love to see a web site that tells you what companies to invest in depending on what events you believe will happen in the future.The web site would provide an ever-Growing list of potential future happenings matched with companies that would prosper in those events.I’d enjoy watching the news a lot more if i had money riding on every sort of outcome.

Les ballets ngres co-Founder richie riley the seeds were sown in 1931 in kingston, jamaica.Marcus garvey, globe-Trotting champion of black awareness, was building a vast amusement park, which-Much like the millennium dome-He wanted to be launched with a vast theatrical extravaganza.A cast was assembled and trained for a year in dance, mime, toms for sale voice and drama;Costumes were procured from as far away as london;The show proved to be a magnificent spectacle-And it collapsed within a week due to lack of funds.

Merriam turkeys are actually native to colorado and were introduced into central montana in 1954 with 13 birds obtained from our colorado neighbors.In 1955 another18 birds from wyoming stock were introduced to montana.The hardy new residents thrived and as their population grew surplus birds were trapped and transported to other parts of the state.

The superficial point, as yglesias concludes, is that if germans really like structural reforms so much, they have very real options to alter their own economic structure.But beyond the merely rhetorical agnosticism on whether germans should embrace such reforms lurks a more serious claim:That germans would be perpetuating a deeply unjust socioeconomic arrangement if they tried to save the euro by extracting harsh cultural changes from other european countries without lifting a finger to change favored elements of their own way of life that could have a substantial impact on europe’s structural troubles.There’s no authority that can force germany to change;After all, europe’s biggest problem is there’s no political authority capable of commanding assent to any continent-Wide changes.

Leave a comment

About this Entry

This page contains a single entry by Andy Lester published on January 31, 2008 6:17 PM.

Fluent numbers with Acme::Numbers was the previous entry in this blog.

Getting lines from a website with GET and ack is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Other Perl Sites

Other Swell Blogs

  • geek2geek: An ongoing analysis of how geeks communicate, how we fail and how to fix it.