What is a Version Control System¶
IT guy version¶
Top 10 reasons for using a version control system:
- Never again suffer from the confusion of juggling multiple versions of your codebase by hand.
- Provides a single source for backups.
- Multiple developers easily work against the same code base.
- Branches are easily managed with version control. Sometimes you
want to experiment and take the project in a whole new direction.
- Commits can reference ticket numbers or bug IDs so that developers
can easily answer the question when did we fix that bug?.
- Easily diff new versions against old ones to pinpoint changes.
- Easily integrate with a web tool like Redmine to provide project
statistics at a glance.
- Plays a key role in continuous integration systems.
- No real software engineer or manager will take your project seriously
unless it’s under version control.
- Develop with impunity. With version control you’re like a trapeze artist
flying worry-free over a safety net.
For these reasons, I believe that just after the compiler/interpreter and debugger,
a versioning system is the most useful weapon in the software engineer’s arsenal.
If your project isn’t under version control yet, what are you waiting for?
by Robert Boyd from http://www.softwarebloat.com
Non IT guy version¶
Let me wrap it up in a few words.
- Imagine a FTP server.
- Now with full history of every change (version) of each file.
- With only up and download of actual changed code lines instead of full files.
- With automated merging of your and mine changes in 99% of the cases.
- It is the real way and only way to share files within a team for coding.
- It makes it a lot easier and way less hassle compared to FTP /
page upload / send files via IM etc.
Normally you use GUI tools to manage the interaction - much like FTP tools
like Filezilla and not FTP on command line. Same is true for SVN/git.
What makes use of source control a bit tricky at the start is the different
wording for one part.
- For FTP/HTTP you call it download and upload.
- Whereas SVN calls it update and commit.
- Git calls it push and pull.
For git there is one bit strange aspect to just acknowledge at the start.
Upload is split into the 4 parts.
- Unstage file.
- Staged file
- Committed file.
- Pushed file.
The background is in normal words.
- Unstaged file: file not marked for any action.
- Staged file: mark file to upload.
- Commited file: uploaded file to local server (with comment)
- Pushed file: uploaded file to dh server.
Everyone who got into using source control, will never work again without!
- Directory and file structure
- Always update
- Frequent commits
- Commit comments
- Binary file handling