0

I am new at java programming. I use netbeans IDE to make a considerably large project. So when I'm developing the project I keep changing the code to make it suitable the need. How do the best way to keep my code before being modified available? It is because I want to keep all of earlier version of my code so when I got error I can easily jump to the earlier version. Thanks for the help.

1
  • 1
    What you're looking for is called Versioning or Version Control. Check Subvertion (or SVN) as a simple start and/or if you feel like it improve it to Git or Mercurial. You'll also need a repository.
    – Fritz
    Mar 4, 2013 at 12:27

2 Answers 2

3

You should seriously consider using a version control system like GIT or SVN especially now that you are working with large projects.

Read this article about version control

0
0

As others have said, version control is your friend. When using version control break your activities down into simple/small tasks. Concentrate on a single task only, and when working, commit that work together with a meaningful comment (your future self will thank you). The idea is to commit little and often. This is useful for two reasons:

  1. if you need to throw away changes, you won't lose much.
  2. if you need to understand what changes you made, there's less to understand

At some point you'll want to branch/tag your work. Tags are useful for marking significant moments in time (like a release) which should probably be frozen. Branches are useful for significant alterations/additions that aren't ready to be 'release ready'. When that work is ready you can merge your changes back in. This allows for a stable (trunk) version of your project and a work in progress (branch) version of your project.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.