Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x

Version Control

Version control, also known as revision control or source control, is the management of changes to documents, computer programs, large web sites, and other collections of information. Changes are usually identified by a number or letter code, termed the "revision number," "revision level," or simply "revision." Version control systems (VCS) most commonly run as stand-alone applications, but revision control is also embedded in various types of software such as word processors and spreadsheets, and in various content management systems. Revision control allows for the ability to revert a document to a previous revision. Git, a widely-used VCS, has its own topic; other popular systems include CVS, Subversion, Team Foundation Server (TFS), Visual SourceSafe (VSS) and Perforce.

Share tech news, updates, or what's on your mind.

Sign up to Post

Git can be a complicated version control system for beginners, but it definitely is one of the best ones out there. Since this article assumes that you're starting at square one, it will skip over things that Git -can- do and will focus on the typical setup for small groups of developers / small projects.

Before getting into any commands, it's important to understand how stuff moves around in Git, because most tutorials start diving into things like "upstream" and "origin" without any good explanations of what data is moving where and why.

One easy way to understand Git is to imagine a ZIP file that is stored on a server somewhere. Whenever you need to update the contents of that ZIP file, you copy the file over to your computer, pull out the files, make your changes, put the changes back into the ZIP file, and then you copy that ZIP file back to the server so that others can get your changes. This is very similar to the workflow for Git.

Step 1: Install Git and a New, Blank Repository

You usually start by installing Git on a server somewhere and creating a new, blank repository on that server.

Analogy: This is like creating an empty ZIP file on the server. Everyone can see the ZIP file and copy it, but there's nothing in it yet, so it's kind of useless.

Note for Admins: Setting up Git is a more advanced topic that requires more detail, but if you are an admin trying to decide on where to install Git, my opinion is that Git works better on
13
 
LVL 29

Expert Comment

by:pepr
Comment Utility
+1 Good intro to create a mental picture what is Git about.

You can make it work on Windows servers, but it's a pain to set up. To clarify that, installation of Git on Windows is extremely easy. What may be more difficult is to make it work using a different than "file" protocol. On the other hand, I have found myself using always the "file" protocol, or to clone from other repositories elsewhere (that one need not to set). I believe, very few beginners will need to set up a Git server. I believe that even a lot of intermediate or advanced programmers will not set a Git server either.

Using Git the simplest way (that is using "file" protocol) is so easy that only unexplainable fear would be the excuse not to use Git even for simplest project where one normally would not care.

If it would be a single purpose, then "copying" the project to a removable media (flash, USB mobile disk) and back is great with Git -- keeping history being a bonus.
0
 
LVL 66

Expert Comment

by:Jim Horn
Comment Utility
Very well written from a 101 perspective.  Voted Yes.
0
How to Use the Help Bell
LVL 10
How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

When working in a large software development team, whether you have many developers working on the same projects, or your project is linked to other projects; it is very important that developers regularly perform "get latest" to ensure that the changes applied by their team mates are included in their workspace.

Although Team Foundation Server 2008 & Visual studio 2008 offer a feature to get latest on checkout, sometimes in larger development teams, there is a need to always ensure the workspaces are most updated all the time.

The below solution helped achieve this within our team, since you can not always rely on the developers' memory / discipline to perform get latest manually.

-Create a new text document with the below text

@echo off
CD D:\Development_applications
"%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe" get
Exit

Where D:\development applications is your workspace folder , change it to your actual workspace.

Save the file as GET.bat in the root of your C drive or wherever you wish.
Open Command Prompt (CMD).
Type the below command.

Schtasks /Create /SC Onidle /I 5 /TN GET /TR C:\get.bat

Enter your Domain account password when prompted into CMD window.

This will create a scheduled task that runs when the computer is idle for 5 minutes (not in use). This will enforce get latest from Team foundation server source control and ensure …
0
 
LVL 23

Author Comment

by:Mohamed Osama
Comment Utility
The solution is not probably for everyone, the part of the schedule is just an example, you can set it to be on computer startup, user log-in or at a particular time.

Development environments differ, what does not suit your team, hits the spot for another.

I am also well aware that developers' discipline is quite different from the SCM, developers prefer to have everything customizable and left to their own judgment.

SCM is more inclined towards automation,avoiding unneeded problems like (human error, build breaks, code instability,release delays , etc..), especially if you work on delivering mission critical systems where delays or errors are not acceptable.
0
 
LVL 23

Author Comment

by:Mohamed Osama
Comment Utility
Another very good use for this script came when configuring a Team foundation proxy server for developers to work on at a remote location
Works like a charm.
0
INTRODUCTION

Subversion is a fantastic version management and software configuration management tool for teams and individuals to manage software applications. It offers many advantages over it's CVS ancestor such as it's built-in compatibility with Apache through the WebDAV protocol giving easy remote access over HTTP.

(Your server will require an external IP address to be accessed from an external location)

This tutorial will take you step-by-step through the install and set-up process for Subversion.


SETTING UP YUM

The easiest way to install and manage packages on Linux is using yum. It can detect dependencies and resolve them for you - easing many headaches! If you do not have it installed then you can quickly install it from the terminal.

Run the following commands to install it (hit y where necessary to confirm the process):

rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm

rpm -Uvh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.19-18.el5.centos.noarch.rpm http://mirror.centos.org/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-13.el5.centos.noarch.rpm

Open in new window


Yum should now be ready to use!

INSTALLING SUBVERSION

1. From the terminal run the following commands (hit y where necessary to confirm the process):

yum install subversion
yum install mod_dav_svn

Open in new window


mod_dav_svn allows integration with Apache through the WebDAV protocol.

You may find that SVN is already installed by default.

Enter svnadmin into the terminal to confirm correct installation.

SETTING UP SUBVERSION

1.
2

Version Control

Version control, also known as revision control or source control, is the management of changes to documents, computer programs, large web sites, and other collections of information. Changes are usually identified by a number or letter code, termed the "revision number," "revision level," or simply "revision." Version control systems (VCS) most commonly run as stand-alone applications, but revision control is also embedded in various types of software such as word processors and spreadsheets, and in various content management systems. Revision control allows for the ability to revert a document to a previous revision. Git, a widely-used VCS, has its own topic; other popular systems include CVS, Subversion, Team Foundation Server (TFS), Visual SourceSafe (VSS) and Perforce.

Top Experts In
Version Control
<
Monthly
>